mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-18 06:59:44 -05:00
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.
This commit is contained in:
parent
d5950255de
commit
f64962ace8
3 changed files with 140 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue