diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-12-22 17:41:09 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-12-23 12:54:45 +0100 |
commit | 717e5d969a301fafd0eada640371dc260da70cc2 (patch) | |
tree | a7ac67eb103e68032933cb4cf57896a4b5f21911 | |
parent | 1f17a7ffef196e198dd443f7b811b553fc58d143 (diff) | |
download | mutter-717e5d969a301fafd0eada640371dc260da70cc2.tar.gz |
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.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1654>
-rw-r--r-- | src/wayland/meta-wayland-pointer.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 1f671829f..71b3dbb15 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -581,17 +581,13 @@ static void repick_for_event (MetaWaylandPointer *pointer, const ClutterEvent *for_event) { - MetaBackend *backend = meta_get_backend (); - ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend)); 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 +1027,7 @@ meta_wayland_pointer_repick (MetaWaylandPointer *pointer) point, CLUTTER_CURRENT_TIME, new_actor, - FALSE); - - repick_for_event (pointer, NULL); + TRUE); } void |