mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 16:34:10 +00:00
wayland/touch: Use surface relative coordinate helper
Use the global to surface local coordinate converter helper, as that will currently convert coordinates for Xwayland client more correctly. https://bugzilla.gnome.org/show_bug.cgi?id=768039
This commit is contained in:
parent
6480a7ee4a
commit
0dfb5d3ef7
@ -202,18 +202,11 @@ touch_get_relative_coordinates (MetaWaylandTouch *touch,
|
|||||||
|
|
||||||
clutter_event_get_coords (event, &event_x, &event_y);
|
clutter_event_get_coords (event, &event_x, &event_y);
|
||||||
|
|
||||||
if (surface->surface_actor)
|
return meta_wayland_surface_get_relative_coordinates (surface,
|
||||||
{
|
|
||||||
clutter_actor_transform_stage_point (CLUTTER_ACTOR (surface->surface_actor),
|
|
||||||
event_x, event_y,
|
event_x, event_y,
|
||||||
&event_x, &event_y);
|
x, y);
|
||||||
}
|
|
||||||
|
|
||||||
*x = event_x / surface->scale;
|
|
||||||
*y = event_y / surface->scale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_wayland_touch_update (MetaWaylandTouch *touch,
|
meta_wayland_touch_update (MetaWaylandTouch *touch,
|
||||||
const ClutterEvent *event)
|
const ClutterEvent *event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user