Skip to content

fix(gfx): SDL_MouseMotionEvent missing state field — real-mouse drags decoded garbage (#599)#600

Merged
InauguralPhysicist merged 1 commit into
mainfrom
fix-motion-struct
Jul 14, 2026
Merged

fix(gfx): SDL_MouseMotionEvent missing state field — real-mouse drags decoded garbage (#599)#600
InauguralPhysicist merged 1 commit into
mainfrom
fix-motion-struct

Conversation

@InauguralPhysicist

Copy link
Copy Markdown
Collaborator

One-line struct fix, big blast radius: the hand-rolled SDL_MouseMotionEvent omitted Uint32 state, misaligning x/y on every real MOUSEMOTION. All real-mouse drags (canvas claim_drag consumers, 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=-419 pre-fix; post-fix deltas decode correctly and the timeline clip visibly moves (bar 1 → bar 4).

Closes #599

🤖 Generated with Claude Code

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>
@InauguralPhysicist InauguralPhysicist merged commit 7055464 into main Jul 14, 2026
17 checks passed
@InauguralPhysicist InauguralPhysicist deleted the fix-motion-struct branch July 14, 2026 06:15
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.

gfx: SDL_MouseMotionEvent missing the state field — every real-mouse drag/hover decodes x/y misaligned

1 participant