diff options
author | Väinö Mäkelä <vaino.o.makela@gmail.com> | 2023-06-01 14:10:09 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-06-03 10:43:12 +0000 |
commit | 07e27ba8549044d2462f3e659c3e77d2e4716fe5 (patch) | |
tree | 75c5a702a4938deeb365f98f35a8c0b61eac3ee7 | |
parent | 0601813ab6e59d965dbd64f41b649bdfb737ed42 (diff) |
xdg-popup: Handle inert seats
According to the protocol text, the popup will be immediately dismissed
when the grab is rejected. Because the grab can't be executed with a
destroyed seat, the popup is dismissed when one is provided.
-rw-r--r-- | types/xdg_shell/wlr_xdg_popup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/types/xdg_shell/wlr_xdg_popup.c b/types/xdg_shell/wlr_xdg_popup.c index f3e64110..c5fdef8e 100644 --- a/types/xdg_shell/wlr_xdg_popup.c +++ b/types/xdg_shell/wlr_xdg_popup.c @@ -274,6 +274,10 @@ static void xdg_popup_handle_grab(struct wl_client *client, struct wlr_seat_client *seat_client = wlr_seat_client_from_resource(seat_resource); + if (seat_client == NULL) { + wlr_surface_destroy_role_object(popup->base->surface); + return; + } if (popup->sent_initial_configure) { wl_resource_post_error(popup->resource, XDG_POPUP_ERROR_INVALID_GRAB, |