Revert "Revert "wayland-pointer: Just use the pointer actor instead of doing a full repick""

The Clutter bug has now been fixed.

This reverts commit ead79f834c.
This commit is contained in:
Jasper St. Pierre 2015-02-06 09:44:08 -08:00
parent 72f5a36522
commit 1f0ed5483a

View File

@ -279,25 +279,12 @@ static void
repick_for_event (MetaWaylandPointer *pointer, repick_for_event (MetaWaylandPointer *pointer,
const ClutterEvent *for_event) const ClutterEvent *for_event)
{ {
ClutterActor *actor = NULL; ClutterActor *actor;
if (for_event) if (for_event)
{
actor = clutter_event_get_source (for_event); actor = clutter_event_get_source (for_event);
}
else else
{ actor = clutter_input_device_get_pointer_actor (pointer->device);
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);
}
}
if (META_IS_SURFACE_ACTOR_WAYLAND (actor)) if (META_IS_SURFACE_ACTOR_WAYLAND (actor))
pointer->current = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor)); pointer->current = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor));