From 515b36da0d686d6845b315268622af578d49b091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 17 Oct 2021 09:52:28 +0200 Subject: [PATCH] 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 --- CHANGELOG.md | 1 + modules/foreign-toplevel.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 938c91e..2ea91e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/modules/foreign-toplevel.c b/modules/foreign-toplevel.c index ef45b3b..2997042 100644 --- a/modules/foreign-toplevel.c +++ b/modules/foreign-toplevel.c @@ -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