Repository navigation
Conversation
Backport the button press/release handling from 03dad26 (rust-windowing#4386).
Author
|
The upstream formatting check passed. The test matrix did not reach compilation of the changed code: the stable Linux and nightly X11 logs both stop in Generate lockfile with Examples from run 42322767369: Linux cargo-deny also reports the two syn versions and the existing |
2 of 4 tasks
This branch has not been deployed
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.
Backport #4386 (03dad26) to
v0.30.xso one legacy X11 wheel notch emits oneMouseWheelevent instead of two.The diff keeps the original direction and
LineDeltamagnitude and ignores the release for buttons 4–7. Ordinary mouse buttons,XIPointerEmulatedfiltering and XI2 scroll valuators are unchanged.Reproduction on a real remote-desktop input path
I reproduced this with TigerVNC 1.12.0, using RFB
PointerEventmessages rather than XTEST. A downward wheel notch is button mask 16 followed by 0. TigerVNC queuesButtonPressandButtonReleasethroughvncPointerButtonAction.Xtigervnc :91 -geometry 1280x1024 -depth 24 -localhost yes -SecurityTypes None -rfbport 5991on a private local display. Do not expose a no-authentication server externally.DISPLAY=:91, run the small winit event-printing application in X11: KeyboardInput is dropped with PointerRoot focus #4822. Give its window explicit focus and keep(100,100)inside its client area.Unmodified 0.30.13, event log after one notch:
The same RFB sequence with this backport:
The original result also reproduces with one XTEST button-5 click under Xvfb. Press-only injection is not an equivalent workaround: six consecutive downs produce only one press because the server keeps the button held.
Verification
cargo test -p winit --lib --no-default-features --features x11,rwh_06: 8 passed.git diff --check: passed.cargo +nightly fmt -- --checkdid not pass locally: the installed formatter identifies as stable and reports unrelated existing formatting differences. The changed match arm follows x11: ignore mouse scroll button release events #4386 exactly.This is for the 0.30 patch-release line; master already contains #4386. No API change.