[mutter] wayland/pointer: Don't set focus while during compositor grab
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/pointer: Don't set focus while during compositor grab
- Date: Wed, 19 Oct 2016 08:46:53 +0000 (UTC)
commit b50da46f439f34173d6320a2f1db1efa3d2b7de4
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Oct 13 23:03:36 2016 +0800
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
src/wayland/meta-wayland-pointer.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 7122d09..9c5ddd3 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -425,10 +425,24 @@ default_grab_focus (MetaWaylandPointerGrab *grab,
{
MetaWaylandPointer *pointer = grab->pointer;
MetaWaylandSeat *seat = meta_wayland_pointer_get_seat (pointer);
+ MetaDisplay *display = meta_get_display ();
if (pointer->button_count > 0)
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))
meta_wayland_pointer_set_focus (pointer, surface);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]