[mutter] wayland/surface: Don't double scale when getting absolute coordinates
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/surface: Don't double scale when getting absolute coordinates
- Date: Thu, 7 Nov 2019 16:37:21 +0000 (UTC)
commit 4a76f66a543fdfa739f2f1b0da5b465b3e3f253d
Author: Xiang Fan <sfanxiang gmail com>
Date: Sat Nov 2 15:05:57 2019 -0400
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
src/wayland/meta-wayland-surface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 5918e38d5..d49572a21 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));
graphene_point3d_t sv = {
- .x = sx * surface->scale,
- .y = sy * surface->scale,
+ .x = sx,
+ .y = sy,
};
graphene_point3d_t v = { 0 };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]