From 50a37a7fc087e17f50004071af7603afc98a465c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 27 Mar 2023 21:43:33 +0200 Subject: [PATCH] wayland/xdg-shell: Dismiss instead of destroy invalid popup Destroying is insufficient as it doesn't end any popup pointer grab, if the dismissed popup was the last. This would later hit an assert as the popup grab is assumed to always have at least one popup in its chain. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2728 Part-of: --- src/wayland/meta-wayland-xdg-shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c index 2fa1a0e1c..547f93222 100644 --- a/src/wayland/meta-wayland-xdg-shell.c +++ b/src/wayland/meta-wayland-xdg-shell.c @@ -1195,7 +1195,7 @@ dismiss_invalid_popup (MetaWaylandXdgPopup *xdg_popup) top_xdg_popup = meta_wayland_xdg_popup_from_surface (top_popup_surface); xdg_popup_send_popup_done (top_xdg_popup->resource); - meta_wayland_popup_destroy (top_xdg_popup->popup); + meta_wayland_popup_dismiss (top_xdg_popup->popup); if (top_xdg_popup == xdg_popup) break;