aboutsummaryrefslogtreecommitdiff
path: root/rootston/seat.c
diff options
context:
space:
mode:
authorMarkus Ongyerth <ongy@ongy.net>2018-07-23 10:08:43 +0200
committerMarkus Ongyerth <ongy@ongy.net>2018-08-06 08:45:41 +0200
commitf64962ace8ac2001b622af9571e9147813a6b3b9 (patch)
tree89420ccd146003c2b10a0d530a6cafbdd9a8ac15 /rootston/seat.c
parentd5950255de146f50c1282af96f34020d298a78d9 (diff)
tablet-v2 tool: Implement implicit grab
Implement the tablet-v2 tablet tool's implicit grab semantics for buttons and tip. This avoids losing focus (to other [sub]surfaces) when a button is held, or the tip is down. This should help when the device is used close to a surface's border and would otherwise have to be very precise.
Diffstat (limited to 'rootston/seat.c')
-rw-r--r--rootston/seat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rootston/seat.c b/rootston/seat.c
index 343720ae..f308da52 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -209,6 +209,7 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) {
if (event->state == WLR_TABLET_TOOL_TIP_DOWN) {
wlr_tablet_v2_tablet_tool_notify_down(roots_tool->tablet_v2_tool);
+ wlr_tablet_tool_v2_start_implicit_grab(roots_tool->tablet_v2_tool);
} else {
wlr_tablet_v2_tablet_tool_notify_up(roots_tool->tablet_v2_tool);
}