fix(gfx): SDL_MouseMotionEvent missing state field — real-mouse drags decoded garbage (#599)#600
Merged
Merged
Conversation
The hand-rolled struct omitted SDL2's Uint32 state (button mask), so motion.x read the button state and motion.y read the true x — every real-mouse drag and hover in every gfx app decoded garbage, while clicks (correctly-declared button struct) and all synthesized-event tests passed. Found live in DeslanStudio: timeline drags were no-ops and a trim clamped a user's clip to a sliver. Verified with xdotool-driven real input before/after. Closes #599 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
One-line struct fix, big blast radius: the hand-rolled
SDL_MouseMotionEventomittedUint32 state, misaligningx/yon every real MOUSEMOTION. All real-mouse drags (canvasclaim_dragconsumers, sliders under real input) and hover targeting were broken in every gfx app; clicks worked (button struct correct) and every headless test synthesizes events past the decode layer, so nothing caught it until live xdotool-driven QA on DeslanStudio.Verified before/after with real driven input: drag handler saw constant
x=-419pre-fix; post-fix deltas decode correctly and the timeline clip visibly moves (bar 1 → bar 4).Closes #599
🤖 Generated with Claude Code