diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-01-14 14:12:28 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-01-15 10:07:05 +1000 |
commit | d5a07eb00b4f6c4aa404164d6dbbd981bf917141 (patch) | |
tree | 4c1bb7fb656afa4c34f55ae2d55aa7a81b08f9fc /src/libinput.c | |
parent | 3c5483ac160572e6b5ede10561a790e5c21d717e (diff) |
tablet: allow the various get_<axis> on tablet button events
There's no reason to prevent this for button events. Unlike the pointer
which is a relative device a tablet is (usually) a device with a lot of state.
Caller code that handles axes is likely shared between the various events,
treating button events separately here doesn't get us any benefit.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
Diffstat (limited to 'src/libinput.c')
-rw-r--r-- | src/libinput.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libinput.c b/src/libinput.c index e9883ffd..84a723a3 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -921,6 +921,7 @@ libinput_event_tablet_tool_x_has_changed( 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return bit_is_set(event->changed_axes, @@ -936,6 +937,7 @@ libinput_event_tablet_tool_y_has_changed( 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return bit_is_set(event->changed_axes, @@ -951,6 +953,7 @@ libinput_event_tablet_tool_pressure_has_changed( 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return bit_is_set(event->changed_axes, @@ -966,6 +969,7 @@ libinput_event_tablet_tool_distance_has_changed( 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return bit_is_set(event->changed_axes, @@ -981,6 +985,7 @@ libinput_event_tablet_tool_tilt_x_has_changed( 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return bit_is_set(event->changed_axes, @@ -996,6 +1001,7 @@ libinput_event_tablet_tool_tilt_y_has_changed( 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return bit_is_set(event->changed_axes, @@ -1011,6 +1017,7 @@ libinput_event_tablet_tool_rotation_has_changed( 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return bit_is_set(event->changed_axes, @@ -1026,6 +1033,7 @@ libinput_event_tablet_tool_slider_has_changed( 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return bit_is_set(event->changed_axes, @@ -1041,6 +1049,7 @@ libinput_event_tablet_tool_wheel_has_changed( 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return bit_is_set(event->changed_axes, @@ -1059,6 +1068,7 @@ libinput_event_tablet_tool_get_axis_value(struct libinput_event_tablet_tool *eve 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); switch(axis) { @@ -1177,6 +1187,7 @@ libinput_event_tablet_tool_get_x_transformed(struct libinput_event_tablet_tool * 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return evdev_device_transform_x(device, @@ -1196,6 +1207,7 @@ libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool * 0, LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, + LIBINPUT_EVENT_TABLET_TOOL_BUTTON, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); return evdev_device_transform_y(device, |