Skip to content

Commit

Permalink
Fixed --close-on-lost-focus misbevahing with non-zero window hide delays
Browse files Browse the repository at this point in the history
  • Loading branch information
AMNatty committed Mar 15, 2024
1 parent 60c6070 commit a44c38b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ fn app_main(config: &Arc<AppConfig>, app: &Application) {

if config.close_on_lost_focus {
window.connect_focus_out_event(|window, _| {
window.close();
if window.is_visible() {
window.close();
}

Propagation::Proceed
});
}
Expand Down

0 comments on commit a44c38b

Please sign in to comment.