wayland: Add meta_wayland_compositor_is_grabbed() method

This will return TRUE if there is an existing pointer or keyboard
grab from the wayland compositor.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
Carlos Garnacho
2022-09-29 15:05:10 +02:00
committed by Marge Bot
parent 1e990ad823
commit aed3979064
8 changed files with 40 additions and 0 deletions

View File

@ -1571,3 +1571,9 @@ meta_wayland_pointer_class_init (MetaWaylandPointerClass *klass)
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
gboolean
meta_wayland_pointer_is_grabbed (MetaWaylandPointer *pointer)
{
return pointer->grab != &pointer->default_grab;
}