[mutter/wip/carlosg/crossings: 6/7] wayland: Only repick pointer on crossing events




commit 1bf57bf5019c5efe109b100aa5a04fbc75a90d73
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Dec 23 12:33:00 2020 +0100

    wayland: Only repick pointer on crossing events
    
    These are the only situations where it makes sense to determine a new
    focus surface.
    
    Suggested-by: Jonas Dreßler <verdre v0yd nl>

 src/wayland/meta-wayland-pointer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 69917e7520..f33761638c 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -612,7 +612,9 @@ void
 meta_wayland_pointer_update (MetaWaylandPointer *pointer,
                              const ClutterEvent *event)
 {
-  repick_for_event (pointer, event);
+  if (event->type == CLUTTER_ENTER ||
+      event->type == CLUTTER_LEAVE)
+    repick_for_event (pointer, event);
 
   if (event->type == CLUTTER_MOTION ||
       event->type == CLUTTER_BUTTON_PRESS ||


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