aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-07 20:57:55 -0500
committerDrew DeVault <sir@cmpwn.com>2018-03-07 20:57:55 -0500
commitbfc0e95d2cfeab96d771cb34e78ca92afee4464c (patch)
treea5f5d132cba797f8f169781a482e9e995df14332 /backend/libinput
parent36dcad13d09d63bd321958ed79d479687479f852 (diff)
Add mode support to libinput backend
And extend tablet example with tilt and ring support
Diffstat (limited to 'backend/libinput')
-rw-r--r--backend/libinput/tablet_pad.c3
-rw-r--r--backend/libinput/tablet_tool.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c
index 70e4c677..f71e1efa 100644
--- a/backend/libinput/tablet_pad.c
+++ b/backend/libinput/tablet_pad.c
@@ -34,6 +34,7 @@ void handle_tablet_pad_button(struct libinput_event *event,
wlr_event.time_msec =
usec_to_msec(libinput_event_tablet_pad_get_time_usec(pevent));
wlr_event.button = libinput_event_tablet_pad_get_button_number(pevent);
+ wlr_event.mode = libinput_event_tablet_pad_get_mode(pevent);
switch (libinput_event_tablet_pad_get_button_state(pevent)) {
case LIBINPUT_BUTTON_STATE_PRESSED:
wlr_event.state = WLR_BUTTON_PRESSED;
@@ -60,6 +61,7 @@ void handle_tablet_pad_ring(struct libinput_event *event,
usec_to_msec(libinput_event_tablet_pad_get_time_usec(pevent));
wlr_event.ring = libinput_event_tablet_pad_get_ring_number(pevent);
wlr_event.position = libinput_event_tablet_pad_get_ring_position(pevent);
+ wlr_event.mode = libinput_event_tablet_pad_get_mode(pevent);
switch (libinput_event_tablet_pad_get_ring_source(pevent)) {
case LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN:
wlr_event.source = WLR_TABLET_PAD_RING_SOURCE_UNKNOWN;
@@ -86,6 +88,7 @@ void handle_tablet_pad_strip(struct libinput_event *event,
usec_to_msec(libinput_event_tablet_pad_get_time_usec(pevent));
wlr_event.strip = libinput_event_tablet_pad_get_strip_number(pevent);
wlr_event.position = libinput_event_tablet_pad_get_strip_position(pevent);
+ wlr_event.mode = libinput_event_tablet_pad_get_mode(pevent);
switch (libinput_event_tablet_pad_get_strip_source(pevent)) {
case LIBINPUT_TABLET_PAD_STRIP_SOURCE_UNKNOWN:
wlr_event.source = WLR_TABLET_PAD_STRIP_SOURCE_UNKNOWN;
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c
index 4e60367f..27cf7c81 100644
--- a/backend/libinput/tablet_tool.c
+++ b/backend/libinput/tablet_tool.c
@@ -71,8 +71,6 @@ void handle_tablet_tool_axis(struct libinput_event *event,
wlr_event.updated_axes |= WLR_TABLET_TOOL_AXIS_WHEEL;
wlr_event.wheel_delta = libinput_event_tablet_tool_get_wheel_delta(tevent);
}
- wlr_log(L_DEBUG, "Tablet tool axis event %d @ %f,%f",
- wlr_event.updated_axes, wlr_event.x_mm, wlr_event.y_mm);
wlr_signal_emit_safe(&wlr_dev->tablet_tool->events.axis, &wlr_event);
}