mirror of
https://github.com/brl/mutter.git
synced 2025-06-24 05:49:59 +00:00
wayland: Fail clients who try to create or destroy a not-top-most popup
If a client creates an xdg_popup given a parent that is a xdg_popup that is not the most top one in the grab chain, send the not_the_topmost_popup error. Also fail a client who destroys a popup that is not the top most one. https://bugzilla.gnome.org/show_bug.cgi?id=744452
This commit is contained in:
@ -741,3 +741,15 @@ meta_wayland_pointer_can_popup (MetaWaylandPointer *pointer, uint32_t serial)
|
||||
{
|
||||
return pointer->grab_serial == serial;
|
||||
}
|
||||
|
||||
MetaWaylandSurface *
|
||||
meta_wayland_pointer_get_top_popup (MetaWaylandPointer *pointer)
|
||||
{
|
||||
MetaWaylandPopupGrab *grab;
|
||||
|
||||
if (!meta_wayland_pointer_grab_is_popup_grab (pointer->grab))
|
||||
return NULL;
|
||||
|
||||
grab = (MetaWaylandPopupGrab*)pointer->grab;
|
||||
return meta_wayland_popup_grab_get_top_popup(grab);
|
||||
}
|
||||
|
Reference in New Issue
Block a user