foreign-toplevel: refresh the bar when a top-level is closed

Fixes an issue where the last active window is still being displayed
in the bar after the corresponding top-level has been closed.

Reported here: https://github.com/johanmalm/labwc/issues/73#issuecomment-945007028
This commit is contained in:
Daniel Eklöf 2021-10-17 09:52:28 +02:00
parent 9fe8ef2574
commit 515b36da0d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 4 additions and 0 deletions

View file

@ -28,6 +28,7 @@
* Crash when `udev_monitor_receive_device()` returned `NULL`. This
affected the “backlight”, “battery” and “removables” modules
(https://codeberg.org/dnkl/yambar/issues/109).
* foreign-toplevel: update bar when a top-level is closed.
### Security

View file

@ -372,6 +372,9 @@ closed(void *data, struct zwlr_foreign_toplevel_handle_v1 *handle)
}
}
mtx_unlock(&mod->lock);
const struct bar *bar = mod->bar;
bar->refresh(bar);
}
static void