1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

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
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

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;
}