[mutter] wayland/tablet-tool: Fix stylus input with HiDPI scaling
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/tablet-tool: Fix stylus input with HiDPI scaling
- Date: Mon, 7 Oct 2019 08:19:21 +0000 (UTC)
commit 7b97c7b35eeb42fc01eb438dbaba66c222810962
Author: Dorian Stoll <dorian stoll tmsp io>
Date: Sun Oct 6 14:52:09 2019 +0200
wayland/tablet-tool: Fix stylus input with HiDPI scaling
After commit 75cffd0e ("shaped-texture: Implement ClutterContent"), the
input to the meta_wayland_tablet_tool_get_relative_coordinates function
is already scaled correctly. By scaling it again, all stylus events are
getting mapped to the screen incorrectly (for anything != 100% scaling).
See also: d3f30d9e
https://gitlab.gnome.org/GNOME/mutter/merge_requests/830
src/wayland/meta-wayland-tablet-tool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-tablet-tool.c b/src/wayland/meta-wayland-tablet-tool.c
index fd491fa50..c02831d73 100644
--- a/src/wayland/meta-wayland-tablet-tool.c
+++ b/src/wayland/meta-wayland-tablet-tool.c
@@ -662,8 +662,8 @@ meta_wayland_tablet_tool_get_relative_coordinates (MetaWaylandTabletTool *tool,
clutter_event_get_coords (event, &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;
+ *sx = wl_fixed_from_double (xf);
+ *sy = wl_fixed_from_double (yf);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]