diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 7e74b9e9e..3b8b10411 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -641,9 +641,15 @@ repick_for_event (MetaWaylandPointer *pointer, MetaWaylandSurface *surface; if (clutter_event_type (for_event) == CLUTTER_LEAVE) - actor = clutter_event_get_related (for_event); + { + actor = clutter_event_get_related (for_event); + } else - actor = clutter_event_get_source (for_event); + { + actor = clutter_stage_get_device_actor (clutter_event_get_stage (for_event), + clutter_event_get_device (for_event), + clutter_event_get_event_sequence (for_event)); + } if (META_IS_SURFACE_ACTOR_WAYLAND (actor)) { diff --git a/src/wayland/meta-wayland-tablet-tool.c b/src/wayland/meta-wayland-tablet-tool.c index 815b09904..8f4ebe82f 100644 --- a/src/wayland/meta-wayland-tablet-tool.c +++ b/src/wayland/meta-wayland-tablet-tool.c @@ -585,9 +585,11 @@ static void repick_for_event (MetaWaylandTabletTool *tool, const ClutterEvent *for_event) { - ClutterActor *actor = NULL; + ClutterActor *actor; - actor = clutter_event_get_source (for_event); + actor = clutter_stage_get_device_actor (clutter_event_get_stage (for_event), + clutter_event_get_device (for_event), + clutter_event_get_event_sequence (for_event)); if (META_IS_SURFACE_ACTOR_WAYLAND (actor)) tool->current = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor)); diff --git a/src/wayland/meta-wayland-touch.c b/src/wayland/meta-wayland-touch.c index 0280195e8..5824e229d 100644 --- a/src/wayland/meta-wayland-touch.c +++ b/src/wayland/meta-wayland-touch.c @@ -220,7 +220,9 @@ meta_wayland_touch_update (MetaWaylandTouch *touch, MetaWaylandSurface *surface = NULL; ClutterActor *actor; - actor = clutter_event_get_source (event); + actor = clutter_stage_get_device_actor (clutter_event_get_stage (event), + clutter_event_get_device (event), + clutter_event_get_event_sequence (event)); if (META_IS_SURFACE_ACTOR_WAYLAND (actor)) surface = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor));