wayland/surface: Don't double scale when getting absolute coordinates

The actor is already in surface coordinate space, so we should not scale
with the buffer scale to transform surface coordinates to stage
coordinates.

This bug causes input method using wayland text-input protocol to
receive wrong cursor location. Reproduced in ibus (when candidate
window is open) with scaling factor other than 1.

This commit also fixes pointer confinement.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/915
This commit is contained in:
Xiang Fan 2019-11-02 15:05:57 -04:00 committed by Jonas Ådahl
parent 7c1f3498fe
commit cf78598974

View File

@ -1647,8 +1647,8 @@ meta_wayland_surface_get_absolute_coordinates (MetaWaylandSurface *surface,
ClutterActor *actor = ClutterActor *actor =
CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)); CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface));
ClutterVertex sv = { ClutterVertex sv = {
.x = sx * surface->scale, .x = sx,
.y = sy * surface->scale, .y = sy,
}; };
ClutterVertex v = { 0 }; ClutterVertex v = { 0 };