mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
wayland/pointer: Use grab helper that doesn't focus when disabling
Instead of using meta_wayland_pointer_end_grab() which focuses the new grab, add a new helper mean to be used to reset the grab state without changing the pointer focus. When using this function, the call site is supposed to explicitly manage focus. https://bugzilla.gnome.org/show_bug.cgi?id=771646
This commit is contained in:
parent
93a6be08a5
commit
7990182f56
@ -86,6 +86,9 @@ static guint signals[LAST_SIGNAL];
|
||||
G_DEFINE_TYPE (MetaWaylandPointer, meta_wayland_pointer,
|
||||
META_TYPE_WAYLAND_INPUT_DEVICE)
|
||||
|
||||
static void
|
||||
meta_wayland_pointer_reset_grab (MetaWaylandPointer *pointer);
|
||||
|
||||
static MetaWaylandPointerClient *
|
||||
meta_wayland_pointer_client_new (void)
|
||||
{
|
||||
@ -495,7 +498,7 @@ meta_wayland_pointer_disable (MetaWaylandPointer *pointer)
|
||||
pointer->cursor_surface_destroy_id);
|
||||
}
|
||||
|
||||
meta_wayland_pointer_end_grab (pointer);
|
||||
meta_wayland_pointer_reset_grab (pointer);
|
||||
meta_wayland_pointer_set_focus (pointer, NULL);
|
||||
|
||||
g_clear_pointer (&pointer->pointer_clients, g_hash_table_unref);
|
||||
@ -866,6 +869,12 @@ meta_wayland_pointer_start_grab (MetaWaylandPointer *pointer,
|
||||
interface->focus (pointer->grab, pointer->current);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_pointer_reset_grab (MetaWaylandPointer *pointer)
|
||||
{
|
||||
pointer->grab = &pointer->default_grab;
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_pointer_end_grab (MetaWaylandPointer *pointer)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user