mirror of
https://github.com/JakeStanger/ironbar.git
synced 2024-11-24 00:27:41 +03:00
fix(launcher): not setting focus state when opening favourite
Fixes partially #225.
This commit is contained in:
parent
87dd7646fc
commit
6f57ad47ac
@ -165,6 +165,7 @@ impl Module<gtk::Box> for LauncherModule {
|
||||
match item {
|
||||
None => {
|
||||
let item: Item = handle.try_into()?;
|
||||
|
||||
items.insert(info.app_id.clone(), item.clone());
|
||||
|
||||
ItemOrWindow::Item(item)
|
||||
@ -358,9 +359,10 @@ impl Module<gtk::Box> for LauncherModule {
|
||||
buttons.insert(item.app_id, button);
|
||||
}
|
||||
}
|
||||
LauncherUpdate::AddWindow(app_id, _) => {
|
||||
LauncherUpdate::AddWindow(app_id, win) => {
|
||||
if let Some(button) = buttons.get(&app_id) {
|
||||
button.set_open(true);
|
||||
button.set_focused(win.open_state.is_focused());
|
||||
|
||||
let mut menu_state = write_lock!(button.menu_state);
|
||||
menu_state.num_windows += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user