From c1d4a31bf8086aa91fdc05690757fe7ed71dc205 Mon Sep 17 00:00:00 2001 From: Iason Paraskevopoulos Date: Tue, 3 Mar 2026 08:46:41 +0000 Subject: [PATCH] fix: don't always open main window on dock click When the screen-share window exists, focus on this one and don't open the main window. --- tauri/src-tauri/src/main.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tauri/src-tauri/src/main.rs b/tauri/src-tauri/src/main.rs index b563908a..8f53abf4 100644 --- a/tauri/src-tauri/src/main.rs +++ b/tauri/src-tauri/src/main.rs @@ -1113,12 +1113,18 @@ fn main() { *reopen_requested = true; } - let main_window = app_handle.get_webview_window("main"); - if let Some(window) = main_window { + let screenshare_window = app_handle.get_webview_window("screenshare"); + if let Some(window) = screenshare_window { let _ = window.show(); let _ = window.set_focus(); } else { - log::error!("Main window not found"); + let main_window = app_handle.get_webview_window("main"); + if let Some(window) = main_window { + let _ = window.show(); + let _ = window.set_focus(); + } else { + log::error!("Main window not found"); + } } let reopen_requested_thread = reopen_requested_clone.clone();