aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/events.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-06-19 14:49:07 -0400
committerDrew DeVault <sir@cmpwn.com>2017-06-19 14:49:07 -0400
commitecb04afcadc96cc8d39749311e4c1c412bebf4a9 (patch)
tree71a6398ee57c2148dbdf5685477a1be917c7fa40 /backend/libinput/events.c
parente9609e9adf2883a1cf2b766adf5363f25f8f0833 (diff)
Implement tablet pads
Diffstat (limited to 'backend/libinput/events.c')
-rw-r--r--backend/libinput/events.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index 8ebec63b..2e7cc541 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -91,7 +91,10 @@ static void handle_device_added(struct wlr_backend_state *state,
wl_signal_emit(&state->backend->events.input_add, wlr_device);
}
if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TABLET_PAD)) {
- // TODO
+ struct wlr_input_device *wlr_device = allocate_device(state,
+ device, devices, WLR_INPUT_DEVICE_TABLET_PAD);
+ wlr_device->tablet_pad = wlr_libinput_tablet_pad_create(device);
+ wl_signal_emit(&state->backend->events.input_add, wlr_device);
}
if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_GESTURE)) {
// TODO
@@ -169,6 +172,15 @@ void wlr_libinput_event(struct wlr_backend_state *state,
case LIBINPUT_EVENT_TABLET_TOOL_BUTTON:
handle_tablet_tool_button(event, device);
break;
+ case LIBINPUT_EVENT_TABLET_PAD_BUTTON:
+ handle_tablet_pad_button(event, device);
+ break;
+ case LIBINPUT_EVENT_TABLET_PAD_RING:
+ handle_tablet_pad_ring(event, device);
+ break;
+ case LIBINPUT_EVENT_TABLET_PAD_STRIP:
+ handle_tablet_pad_strip(event, device);
+ break;
default:
wlr_log(L_DEBUG, "Unknown libinput event %d", event_type);
break;