diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-10-07 21:28:45 -0700 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-10-07 21:30:15 -0700 |
commit | 33acb5fea07c83236f254456d11d34e2c7671719 (patch) | |
tree | db88afa9e86cbee36fe62df8f59a272b0e013a9a | |
parent | 591718dc02e22d9ffcbcbdd324e68df924985164 (diff) | |
download | mutter-33acb5fea07c83236f254456d11d34e2c7671719.tar.gz |
wayland-pointer: Just use the pointer actor instead of doing a full repick
The full repick is unnecessary -- Clutter already does it for us.
-rw-r--r-- | src/wayland/meta-wayland-pointer.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 24c281886..63a03744c 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -281,25 +281,12 @@ static void repick_for_event (MetaWaylandPointer *pointer, const ClutterEvent *for_event) { - ClutterActor *actor = NULL; + ClutterActor *actor; if (for_event) - { - actor = clutter_event_get_source (for_event); - } + actor = clutter_event_get_source (for_event); else - { - ClutterStage *stage = clutter_input_device_get_pointer_stage (pointer->device); - - if (stage) - { - ClutterPoint pos; - - clutter_input_device_get_coords (pointer->device, NULL, &pos); - actor = clutter_stage_get_actor_at_pos (stage, CLUTTER_PICK_REACTIVE, - pos.x, pos.y); - } - } + actor = clutter_input_device_get_pointer_actor (pointer->device); if (META_IS_SURFACE_ACTOR_WAYLAND (actor)) pointer->current = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor)); |