mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
cursor: omit pointer cursor shape for tablet tool
Omit cursor notifications from a pointer when a tablet tool (stylus/pen) is in proximity. This is equivalent to `handle_request_set_cursor()` and prevents a resize cursor for out-of-surface scrolling with a tablet tool in recent GTK4 (which uses the cursor shape protocol).
This commit is contained in:
parent
9782ffa868
commit
c63ba3c7fa
1 changed files with 10 additions and 0 deletions
|
|
@ -224,6 +224,16 @@ handle_request_set_shape(struct wl_listener *listener, void *data)
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Omit cursor notifications from a pointer when a tablet
|
||||
* tool (stylus/pen) is in proximity.
|
||||
*/
|
||||
if (tablet_tool_has_focused_surface(seat)
|
||||
&& event->device_type
|
||||
!= WLR_CURSOR_SHAPE_MANAGER_V1_DEVICE_TYPE_TABLET_TOOL) {
|
||||
return;
|
||||
}
|
||||
|
||||
wlr_log(WLR_DEBUG, "set xcursor to shape %s", shape_name);
|
||||
wlr_cursor_set_xcursor(seat->cursor, seat->xcursor_manager, shape_name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue