From 42fb4a95721860df3db9ddd3adcd263a42216d88 Mon Sep 17 00:00:00 2001 From: Vladimir Borisov Date: Fri, 8 Mar 2024 12:11:37 +0200 Subject: [PATCH] Fix crash on full screen --- src/stremio_app/app.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/stremio_app/app.rs b/src/stremio_app/app.rs index 5b782b2..f59eca6 100644 --- a/src/stremio_app/app.rs +++ b/src/stremio_app/app.rs @@ -28,7 +28,7 @@ pub struct MainWindow { #[nwg_resource(source_embed: Some(&data.embed), source_embed_str: Some("MAINICON"))] pub window_icon: nwg::Icon, #[nwg_control(icon: Some(&data.window_icon), title: "Stremio", flags: "MAIN_WINDOW|VISIBLE")] - #[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)], OnWindowMaximize: [Self::transmit_window_state_change], OnWindowMinimize: [Self::transmit_window_state_change] )] + #[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] )] 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]) ] @@ -214,8 +214,6 @@ impl MainWindow { fn on_paint(&self) { if self.splash_screen.visible() { self.splash_screen.resize(self.window.size()); - } else { - self.transmit_window_state_change(); } } fn on_toggle_fullscreen_notice(&self) {