Skip to content

Fix touch screen drag freezing input#1151

Merged
Thesola10 merged 6 commits intopaperwm:developfrom
JaniSoto:fix-touch-grab-wayland
Apr 21, 2026
Merged

Fix touch screen drag freezing input#1151
Thesola10 merged 6 commits intopaperwm:developfrom
JaniSoto:fix-touch-grab-wayland

Conversation

@JaniSoto
Copy link
Copy Markdown
Contributor

Fixes #1127.

Cause:
The code was successfully intercepting TOUCH_END and running this.end(). Workaround of faking a virtual mouse click to drop the grab only works for mouse/pointer grabs. Mutter ignores the fake mouse click if the grab was started by a touch sequence, leaving the grab stuck open.

Fix:
Since hitting Esc acts as a global kill-switch for Mutter grabs, this PR adds a virtualKeyboard device. Alongside the fake mouse click, it now fires a virtual Escape keypress during cleanup. This successfully breaks the touch grab.

Tested on CachyOS / GNOME 50 and it works perfectly!

@JaniSoto JaniSoto changed the base branch from release to develop April 10, 2026 07:50
Comment thread grab.js Outdated
@Thesola10 Thesola10 changed the title Fix touch screen drag freezing input (#1127) Fix touch screen drag freezing input Apr 21, 2026
@Thesola10 Thesola10 merged commit dd66ba3 into paperwm:develop Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drag using touchscreen freezes the environment.

2 participants