summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-02-01 14:13:11 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-02-10 12:05:16 +1000
commitd8eced2afed75eb0d161a53a911a2dbd89f5d2ef (patch)
tree900f83a05b734d3fd890eabe59414e76f95f71d7 /src
parentebe02cb19eedadb719947d807a108f1493c3c8b4 (diff)
tablet: move clearing the tilt bits up to where we reset the axes
No functional change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev-tablet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index f1167e55..9a2bfdde 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -262,8 +262,6 @@ convert_tilt_to_rotation(struct tablet_dispatch *tablet)
*/
x = tablet->axes.tilt.x;
y = tablet->axes.tilt.y;
- clear_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
- clear_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
/* atan2 is CCW, we want CW -> negate x */
if (x || y)
@@ -512,6 +510,8 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
if (tablet->current_tool_type == LIBINPUT_TABLET_TOOL_TYPE_MOUSE ||
tablet->current_tool_type == LIBINPUT_TABLET_TOOL_TYPE_LENS) {
axes.rotation = tablet_handle_mouse_rotation(tablet, device);
+ clear_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
+ clear_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
axes.tilt.x = 0;
axes.tilt.y = 0;