[PATCH libinput 1/3] tablet: move clearing the tilt bits up to where we reset the axes

Peter Hutterer peter.hutterer at who-t.net
Sun Jan 31 22:28:30 PST 2016


No functional change.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-tablet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index e684055..5fb921f 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -253,8 +253,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)
@@ -503,6 +501,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;
 
-- 
2.5.0



More information about the wayland-devel mailing list