Skip to content

Commit 155db1a

Browse files
committed
fix: resolve non-functional window buttons on Ubuntu 24.04/GNOME by adding delay before focus request
1 parent f7f63ab commit 155db1a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src-tauri/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ pub fn run_app() {
115115
window_clone.set_fullscreen(true).unwrap();
116116
// Ensure webview maintains focus for input after fullscreen
117117
let _ = window_clone.set_focus();
118+
} else {
119+
// Fix: Ubuntu 24.04/GNOME window buttons non-functional until resize (#1122)
120+
// The window manager needs time to process the MapWindow event before
121+
// accepting focus requests. Without this, decorations remain non-interactive.
122+
tokio::time::sleep(tokio::time::Duration::from_millis(30)).await;
123+
let _ = window_clone.set_focus();
118124
}
119125
}
120126
});

0 commit comments

Comments
 (0)