Skip to content

Commit 545eb62

Browse files
committed
Closes main window when settings open
Ensures that the main window is closed, rather than hidden, when the settings window is opened. This prevents potential issues related to device usage and improves the overall user experience.
1 parent a292974 commit 545eb62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/desktop/src-tauri/src/windows.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl ShowCapWindow {
380380
window
381381
}
382382
Self::Settings { page } => {
383-
// Hide main window and target select overlays when settings window opens
383+
// Close main window and target select overlays when settings window opens
384384
for (label, window) in app.webview_windows() {
385385
if let Ok(id) = CapWindowId::from_str(&label)
386386
&& matches!(
@@ -390,7 +390,7 @@ impl ShowCapWindow {
390390
| CapWindowId::Camera
391391
)
392392
{
393-
let _ = window.hide();
393+
let _ = window.close();
394394
}
395395
}
396396

0 commit comments

Comments
 (0)