[mutter/wip/carlosg/crossings: 3/9] wayland: Avoid repick_for_event() call




commit 71f3b3b2721d4958a9d20ae4fb1295318d841a72
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Dec 22 17:41:09 2020 +0100

    wayland: Avoid repick_for_event() call
    
    We can also tell the stage to emit crossing events, which will be
    handled in place (i.e. not queued), and yield the same result.

 src/wayland/meta-wayland-pointer.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 1f671829fd..af91b70982 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -586,12 +586,10 @@ repick_for_event (MetaWaylandPointer *pointer,
   ClutterActor *actor;
   MetaWaylandSurface *surface;
 
-  if (for_event && clutter_event_type (for_event) == CLUTTER_LEAVE)
+  if (clutter_event_type (for_event) == CLUTTER_LEAVE)
     actor = clutter_event_get_related (for_event);
-  else if (for_event)
-    actor = clutter_event_get_source (for_event);
   else
-    actor = clutter_stage_get_device_actor (stage, pointer->device, NULL);
+    actor = clutter_event_get_source (for_event);
 
   if (META_IS_SURFACE_ACTOR_WAYLAND (actor))
     {
@@ -1031,9 +1029,7 @@ meta_wayland_pointer_repick (MetaWaylandPointer *pointer)
                                point,
                                CLUTTER_CURRENT_TIME,
                                new_actor,
-                               FALSE);
-
-  repick_for_event (pointer, NULL);
+                               TRUE);
 }
 
 void


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