mirror of
https://github.com/brl/mutter.git
synced 2024-12-28 13:52:15 +00:00
wayland: Move away from clutter_event_get_source()
Instead ask the stage about the target actor, which is equivalent and ensured to be up-to-date. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2311>
This commit is contained in:
parent
52002d042e
commit
9b6253bf3f
@ -641,9 +641,15 @@ repick_for_event (MetaWaylandPointer *pointer,
|
|||||||
MetaWaylandSurface *surface;
|
MetaWaylandSurface *surface;
|
||||||
|
|
||||||
if (clutter_event_type (for_event) == CLUTTER_LEAVE)
|
if (clutter_event_type (for_event) == CLUTTER_LEAVE)
|
||||||
actor = clutter_event_get_related (for_event);
|
{
|
||||||
|
actor = clutter_event_get_related (for_event);
|
||||||
|
}
|
||||||
else
|
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))
|
if (META_IS_SURFACE_ACTOR_WAYLAND (actor))
|
||||||
{
|
{
|
||||||
|
@ -585,9 +585,11 @@ static void
|
|||||||
repick_for_event (MetaWaylandTabletTool *tool,
|
repick_for_event (MetaWaylandTabletTool *tool,
|
||||||
const ClutterEvent *for_event)
|
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))
|
if (META_IS_SURFACE_ACTOR_WAYLAND (actor))
|
||||||
tool->current = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor));
|
tool->current = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor));
|
||||||
|
@ -220,7 +220,9 @@ meta_wayland_touch_update (MetaWaylandTouch *touch,
|
|||||||
MetaWaylandSurface *surface = NULL;
|
MetaWaylandSurface *surface = NULL;
|
||||||
ClutterActor *actor;
|
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))
|
if (META_IS_SURFACE_ACTOR_WAYLAND (actor))
|
||||||
surface = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor));
|
surface = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor));
|
||||||
|
Loading…
Reference in New Issue
Block a user