diff options
author | Markus Ongyerth <ongy@ongy.net> | 2018-05-04 11:46:32 +0200 |
---|---|---|
committer | Markus Ongyerth <ongy@ongy.net> | 2018-07-14 09:40:39 +0200 |
commit | 5c7a37f30922d973e176b0eec29bb5fddf241eee (patch) | |
tree | 73f90d316f4aa5c509ff5dca69851964dd9761e6 /backend/libinput | |
parent | 391eef6ea9acfd12856970548cb75dbef83dc702 (diff) |
Add tool buttons
Diffstat (limited to 'backend/libinput')
-rw-r--r-- | backend/libinput/tablet_tool.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c index 36b64836..3a39f5dc 100644 --- a/backend/libinput/tablet_tool.c +++ b/backend/libinput/tablet_tool.c @@ -263,11 +263,14 @@ void handle_tablet_tool_proximity(struct libinput_event *event, break; case LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN: wlr_event.state = WLR_TABLET_TOOL_PROXIMITY_IN; - handle_tablet_tool_axis(event, libinput_dev); break; } wlr_signal_emit_safe(&wlr_dev->tablet_tool->events.proximity, &wlr_event); + if (libinput_event_tablet_tool_get_proximity_state(tevent) == LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN) { + handle_tablet_tool_axis(event, libinput_dev); + } + // If the tool is not unique, libinput will not find it again after the // proximity out, so we should destroy it if (!tool->unique && |