diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-08-24 00:14:18 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-24 13:39:38 +0900 |
commit | fa477c77c47ea638626d4dcd52f4a3bedbda3fd2 (patch) | |
tree | db5a8d637e51971dd34dbab686cb1659017cd56b | |
parent | e19f48d1e4cea6bbb8998466553fffda4bd13251 (diff) |
wlr-layer-shell-v1: destroy xdg popups on unmap
This destroys the xdg popups associated with a layer surface when the
layer surface is unmapped. It does not make sense to keep the popups
open when unmapped.
-rw-r--r-- | types/wlr_layer_shell_v1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c index 330caaf2..bcc56cad 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c @@ -188,6 +188,11 @@ static void layer_surface_unmap(struct wlr_layer_surface_v1 *surface) { // TODO: probably need to ungrab before this event wlr_signal_emit_safe(&surface->events.unmap, surface); + struct wlr_xdg_popup *popup, *popup_tmp; + wl_list_for_each_safe(popup, popup_tmp, &surface->popups, link) { + wlr_xdg_popup_destroy(popup->base); + } + struct wlr_layer_surface_v1_configure *configure, *tmp; wl_list_for_each_safe(configure, tmp, &surface->configure_list, link) { layer_surface_configure_destroy(configure); |