fix(win32): forward bare mouse motion as SGR button 35 for hover#77
Open
KoalaHao wants to merge 1 commit into
Open
fix(win32): forward bare mouse motion as SGR button 35 for hover#77KoalaHao wants to merge 1 commit into
KoalaHao wants to merge 1 commit into
Conversation
Windows reports a MOUSE_EVENT for every pixel of movement, including hover. The previous code returned [] for bare motion (no button held), so MouseRegion and onHover callbacks never fired on Windows. Now emits SGR button code 35 (motion flag 0x20 + base button 3), matching the Linux path's SGR mode 1003 encoding. MouseParser already classifies button 35 as a hover event (isMotion: true, pressed: false), so the framework receives the same MouseEvent shape it gets on Linux and the two backends stay in lock-step. No effect on click/drag handling: those continue to use their existing button codes (0/1/2 for press, 32+offset for drag).
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.
Windows reports a MOUSE_EVENT for every pixel of movement, including hover. The previous code returned [] for bare motion (no button held), so MouseRegion and onHover callbacks never fired on Windows.
Now emits SGR button code 35 (motion flag 0x20 + base button 3), matching the Linux path's SGR mode 1003 encoding. MouseParser already classifies button 35 as a hover event (isMotion: true, pressed: false), so the framework receives the same MouseEvent shape it gets on Linux and the two backends stay in lock-step.
No effect on click/drag handling: those continue to use their existing button codes (0/1/2 for press, 32+offset for drag).