[mutter/wip/carlosg/picking-fixes: 3/4] wayland: Do not account touch crossing events for pointer




commit d39d4d124e5b1a4208197393cf2aa073b0a9fbc3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Dec 28 18:38:51 2020 +0100

    wayland: Do not account touch crossing events for pointer
    
    These events may be emitted for touchpoints (in which case they contain
    an event sequence). Ignore those as they are not relevant for pointer
    picking, and shouldn't influence its focus.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1657>

 src/wayland/meta-wayland-pointer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 1d6bb759c8..28203c28c4 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -611,8 +611,9 @@ void
 meta_wayland_pointer_update (MetaWaylandPointer *pointer,
                              const ClutterEvent *event)
 {
-  if (event->type == CLUTTER_ENTER ||
-      event->type == CLUTTER_LEAVE)
+  if ((event->type == CLUTTER_ENTER ||
+       event->type == CLUTTER_LEAVE) &&
+      !clutter_event_get_event_sequence (event))
     repick_for_event (pointer, event);
 
   if (event->type == CLUTTER_MOTION ||


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]