fix(launcher): not clearing focused state when closing window

Fixes #213.
Fixes partially #225.
This commit is contained in:
Jake Stanger
2023-07-16 20:24:23 +01:00
parent 06251e293e
commit 87dd7646fc

View File

@@ -381,8 +381,12 @@ impl Module<gtk::Box> for LauncherModule {
}
}
}
LauncherUpdate::RemoveWindow(app_id, _) => {
LauncherUpdate::RemoveWindow(app_id, win_id) => {
debug!("Removing window {win_id} with id {app_id}");
if let Some(button) = buttons.get(&app_id) {
button.set_focused(false);
let mut menu_state = write_lock!(button.menu_state);
menu_state.num_windows -= 1;
}