wayland/tablet-tool: Use meta_wayland_surface_get_relative_coordinates()

Instead of directly calling into clutter_actor_transform_stage_point().

https://gitlab.gnome.org/GNOME/mutter/merge_requests/409
This commit is contained in:
Georges Basile Stavracas Neto 2019-07-09 12:36:16 -03:00 committed by Jonas Ådahl
parent 6b35a4901e
commit 2d7adb90c8

View File

@ -657,14 +657,10 @@ meta_wayland_tablet_tool_get_relative_coordinates (MetaWaylandTabletTool *tool,
wl_fixed_t *sx,
wl_fixed_t *sy)
{
MetaSurfaceActor *surface_actor;
float xf, yf;
surface_actor = meta_wayland_surface_get_actor (surface);
clutter_event_get_coords (event, &xf, &yf);
clutter_actor_transform_stage_point (CLUTTER_ACTOR (surface_actor),
xf, yf, &xf, &yf);
meta_wayland_surface_get_relative_coordinates (surface, xf, yf, &xf, &yf);
*sx = wl_fixed_from_double (xf) / surface->scale;
*sy = wl_fixed_from_double (yf) / surface->scale;