summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang Fan <sfanxiang@gmail.com>2019-11-02 15:05:57 -0400
committerJonas Ã…dahl <jadahl@gmail.com>2019-11-07 17:56:14 +0100
commitcf78598974b12be0d7fa67f6022abf0eac078b2b (patch)
tree80b771c2b71111961b15b3b9b018123f7388820a
parent7c1f3498fea52bfb3df18a7e6ca282046cf8533a (diff)
downloadmutter-cf78598974b12be0d7fa67f6022abf0eac078b2b.tar.gz
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
-rw-r--r--src/wayland/meta-wayland-surface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 163b7c515..56d292517 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -1647,8 +1647,8 @@ meta_wayland_surface_get_absolute_coordinates (MetaWaylandSurface *surface,
ClutterActor *actor =
CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface));
ClutterVertex sv = {
- .x = sx * surface->scale,
- .y = sy * surface->scale,
+ .x = sx,
+ .y = sy,
};
ClutterVertex v = { 0 };