mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
wayland/pointer: Don't set focus while during compositor grab
Teach the default grab about compositor grabs (i.e. display->event_route) so that it can avoid setting a pointer focus when after the compositor grab actively unset the pointer focus. https://bugzilla.gnome.org/show_bug.cgi?id=772914
This commit is contained in:
parent
8b0e9706ca
commit
b50da46f43
@ -425,10 +425,24 @@ default_grab_focus (MetaWaylandPointerGrab *grab,
|
|||||||
{
|
{
|
||||||
MetaWaylandPointer *pointer = grab->pointer;
|
MetaWaylandPointer *pointer = grab->pointer;
|
||||||
MetaWaylandSeat *seat = meta_wayland_pointer_get_seat (pointer);
|
MetaWaylandSeat *seat = meta_wayland_pointer_get_seat (pointer);
|
||||||
|
MetaDisplay *display = meta_get_display ();
|
||||||
|
|
||||||
if (pointer->button_count > 0)
|
if (pointer->button_count > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
switch (display->event_route)
|
||||||
|
{
|
||||||
|
case META_EVENT_ROUTE_WINDOW_OP:
|
||||||
|
case META_EVENT_ROUTE_COMPOSITOR_GRAB:
|
||||||
|
case META_EVENT_ROUTE_FRAME_BUTTON:
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case META_EVENT_ROUTE_NORMAL:
|
||||||
|
case META_EVENT_ROUTE_WAYLAND_POPUP:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (meta_wayland_seat_has_pointer (seat))
|
if (meta_wayland_seat_has_pointer (seat))
|
||||||
meta_wayland_pointer_set_focus (pointer, surface);
|
meta_wayland_pointer_set_focus (pointer, surface);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user