Pick up the gpui fork's Wayland tablet and touchpad-pinch work - #39
Merged
Conversation
Wayland now reports real stylus pressure via zwp_tablet_v2 instead of a constant 1.0, so pressure-sensitive painting works on the third of the four backends. Windows precision-touchpad pinch is in the same bump but is opt-in behind GPUI_ENABLE_DIRECT_MANIPULATION and off here.
The "not there yet" entry for Wayland pressure is out of date as of the gpui rev bump. What replaces it is not "done" but a different caveat: all four backends feed pressure now, and not one of them has been driven by an actual stylus. Also spells out why Windows precision-touchpad pinch stays a gap. It reads as an omission otherwise, when it is a decision -- Direct Manipulation cannot be claimed for pinches without claiming two-finger pans and the scrolling that goes with them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps the pinned
gpuirev to84bdb01, which closes both of the fork's outstanding backend gaps, and brings the README in line with it. No other schist code changes.What the fork gained
Wayland stylus pressure, via
zwp_tablet_v2. Wayland was the last backend reporting a constant1.0, so pressure-sensitive painting silently did nothing there. It isn't a matter of reading an extra axis the way X11's is: tablet input on Wayland is a protocol of its own, and binding it makes the compositor stop emulating pointer events for the tool. The backend now synthesises the whole mouse event stream fromzwp_tablet_tool_v2— tip as the left button, barrel buttons as right/middle, proximity as enter/exit — with pressure on the three events that carry it. A hovering stylus reports a true zero, matching X11; a tool with no pressure axis reports1.0, matching a mouse.Windows precision-touchpad pinch, via Direct Manipulation — opt-in, off by default.
WM_GESTUREonly ever covered touchscreens.DM_POINTERHITTESTarrives before Windows has classified the gesture, so claiming the contact to get a pinch also claims two-finger pans and suppresses theWM_MOUSEWHEELthey used to produce; the fork consequently synthesises the scrolling too. That is a replacement for Windows touchpad scrolling written against a cross-compile, on a platform none of us can run, so it stays behindGPUI_ENABLE_DIRECT_MANIPULATIONuntil someone has driven it on real hardware. Unset, the window keeps the Ctrl+scroll fallback and behaves exactly as it does today.Nothing in this repo sets that variable, so on this branch the Windows half is inert.
README
"Mouse and touchpad" now says pressure works on all four backends, and says why the Windows touchpad pinch gap is a decision rather than an omission. The "not there yet" entry for Wayland pressure is replaced rather than deleted — the honest caveat is no longer "Wayland is missing" but "all four paths were written against platform documentation and none has met a physical stylus".
Verification
cargo check --workspaceclean against the new rev.cargo test --features test-support --test pinch(5 pass), newwayland/client.rsunit tests (2 pass),cargo check --target x86_64-pc-windows-gnuclean,cargo fmt --checkclean, and thehello_worldexample renders correctly under Xvfb.UPSTREAM.mdrecords.🤖 Generated with Claude Code