Skip to content

Commit

Permalink
wayland/xdg-shell: Dismiss instead of destroy invalid popup
Browse files Browse the repository at this point in the history
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2940>

(cherry picked from commit 50a37a7f)
  • Loading branch information
jadahl committed May 22, 2023
1 parent 316fa6a commit 8d7e958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wayland/meta-wayland-xdg-shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,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;
Expand Down

0 comments on commit 8d7e958

Please sign in to comment.