From a07a139588ec7f3dac491ee6d8b7ff2b038ad219 Mon Sep 17 00:00:00 2001 From: Vladimir Borisov Date: Fri, 19 Apr 2024 19:05:32 +0300 Subject: [PATCH] Make tray behave like on old shell --- src/stremio_app/app.rs | 2 +- src/stremio_app/systray.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stremio_app/app.rs b/src/stremio_app/app.rs index d513e1e..8e0aac9 100644 --- a/src/stremio_app/app.rs +++ b/src/stremio_app/app.rs @@ -47,7 +47,7 @@ pub struct MainWindow { #[nwg_events( OnWindowClose: [Self::on_quit(SELF, EVT_DATA)], OnInit: [Self::on_init], OnPaint: [Self::on_paint], OnMinMaxInfo: [Self::on_min_max(SELF, EVT_DATA)], OnWindowMinimize: [Self::transmit_window_state_change], OnWindowMaximize: [Self::transmit_window_state_change] )] pub window: nwg::Window, #[nwg_partial(parent: window)] - #[nwg_events((tray_exit, OnMenuItemSelected): [nwg::stop_thread_dispatch()], (tray_show_hide, OnMenuItemSelected): [Self::on_show_hide], (tray_topmost, OnMenuItemSelected): [Self::on_toggle_topmost]) ] + #[nwg_events((tray, MousePressLeftUp): [Self::on_show_hide], (tray_exit, OnMenuItemSelected): [nwg::stop_thread_dispatch()], (tray_show_hide, OnMenuItemSelected): [Self::on_show_hide], (tray_topmost, OnMenuItemSelected): [Self::on_toggle_topmost]) ] pub tray: SystemTray, #[nwg_partial(parent: window)] pub webview: WebView, diff --git a/src/stremio_app/systray.rs b/src/stremio_app/systray.rs index 4d7c1e4..8063fac 100644 --- a/src/stremio_app/systray.rs +++ b/src/stremio_app/systray.rs @@ -8,7 +8,7 @@ pub struct SystemTray { #[nwg_resource(source_embed: Some(&data.embed), source_embed_str: Some("MAINICON"))] pub tray_icon: nwg::Icon, #[nwg_control(icon: Some(&data.tray_icon), tip: Some("Stremio"))] - #[nwg_events(MousePressLeftUp: [Self::show_menu], OnContextMenu: [Self::show_menu])] + #[nwg_events(OnContextMenu: [Self::show_menu])] pub tray: nwg::TrayNotification, #[nwg_control(popup: true)] pub tray_menu: nwg::Menu,