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




commit 63f471bb29539200d12cfe04d02d0592b6aa4462
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 c2b8741d48..1d6bb759c8 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -611,7 +611,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]