From 98520a9a50c8340b6b8af561f472d93f676f74dd Mon Sep 17 00:00:00 2001 From: Alexandr Bogomiakov Date: Thu, 24 Jul 2025 04:20:36 +0300 Subject: [PATCH] Fixed tray icon on linux --- src/gui/tray/app.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/gui/tray/app.rs b/src/gui/tray/app.rs index 5f8efc5..ae349f2 100644 --- a/src/gui/tray/app.rs +++ b/src/gui/tray/app.rs @@ -18,16 +18,7 @@ use winit::platform::macos::EventLoopBuilderExtMacOS; #[cfg(target_os = "linux")] use gtk::glib; -// GTK initialization for Linux tray support -#[cfg(target_os = "linux")] -static GTK_INIT: std::sync::Once = std::sync::Once::new(); - // Channel for Linux tray communication -#[cfg(target_os = "linux")] -type LinuxTrayChannel = ( - std::sync::mpsc::Sender, - std::sync::mpsc::Receiver, -); #[cfg(target_os = "linux")] enum LinuxTrayCommand { @@ -41,6 +32,7 @@ enum LinuxTrayCommand { SetTooltip { tooltip: String, }, + #[allow(dead_code)] Quit, } @@ -49,6 +41,7 @@ enum LinuxTrayResponse { TrayCreated { menu_ids: TrayMenuIds, }, + #[allow(dead_code)] MenuUpdated { menu_ids: TrayMenuIds, }, @@ -334,7 +327,7 @@ impl ApplicationHandler for TrayApplication { let mut tray_icon: Option = None; // Set up GTK event handlers - let tx_clone = tx.clone(); + let _tx_clone = tx.clone(); glib::timeout_add_local(std::time::Duration::from_millis(100), move || { while let Ok(cmd) = rx.try_recv() { match cmd {