mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-14 08:21:27 -04:00
input: improve touch handling on pointer presense
No longer inhibits touch event handling when terminal window has pointer focus. Instead, inhibit touch event when at least one pointer button is held down. This change improves user experience when using foot with both a mouse and a touchscreen. Closes #1428.
This commit is contained in:
parent
4f3f614457
commit
f0f0d02bf7
3 changed files with 73 additions and 32 deletions
|
|
@ -345,6 +345,12 @@ seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
|
|||
if (seat->pointer.theme != NULL)
|
||||
wl_cursor_theme_destroy(seat->pointer.theme);
|
||||
|
||||
if (seat->wl_touch != NULL &&
|
||||
seat->touch.state == TOUCH_STATE_INHIBITED)
|
||||
{
|
||||
seat->touch.state = TOUCH_STATE_IDLE;
|
||||
}
|
||||
|
||||
seat->wl_pointer = NULL;
|
||||
seat->pointer.surface.surf = NULL;
|
||||
seat->pointer.theme = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue