mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 01:48:55 +00:00
Jason Gerecke
a4cef8586c
backends/native: Interpret tablet padding as being input-centric
It is possible to interpret the ammount of padding provided to the *_set_tablet_area functions in two different and incompatible ways. The X11 backend effectively treats them as being input-centric (i.e., the padding defines the size of the "dead zone" on the tablet) while the native backend has an output-centric viewpoint (i.e., the padding defines the size of the "dead zone" on the display) viewpoint. This difference in opinion causes the cursor offset to change when switching between Xorg and a Wayland sessions. The calibration utility within g-c-c does its calculations with an input- centric viewpoint, so this patch modifies the native backend to work correctly with these values. To change viewpoints, we can simply invert the scale and negate the offset. It should be noted that this function also forgot to apply scaling to the offsets (as required by the matrix transform done by libinput) which would have further compounded the cursor offset issue under Wayland. https://bugzilla.gnome.org/show_bug.cgi?id=784009
…
…
Description
Languages
C
98.9%
Meson
0.7%
Python
0.3%