diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-07 20:57:55 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-07 20:57:55 -0500 |
commit | bfc0e95d2cfeab96d771cb34e78ca92afee4464c (patch) | |
tree | a5f5d132cba797f8f169781a482e9e995df14332 /backend/libinput | |
parent | 36dcad13d09d63bd321958ed79d479687479f852 (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.c | 3 | ||||
-rw-r--r-- | backend/libinput/tablet_tool.c | 2 |
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); } |