We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 558

Summary: Please add the current button status to SDL_MouseButtonEvent
Product: SDL Reporter: Samuel Thibault <samuel.thibault>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED ABANDONED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: HG 2.1   
Hardware: All   
OS: All   

Description Samuel Thibault 2008-02-26 04:29:49 UTC
To save the application the burden of keeping track of the current status of buttons, please add a field holding the buttons state to SDL_MouseButtonEvent.

Note: yes, SDL_GetMouseState() permits to fetch the buttons status, but that gives the current button status, not the status at the time of the event.
Comment 1 Ryan C. Gordon 2009-09-13 15:45:10 UTC
I'm bumping this bug to 1.3, since we probably aren't changing the 1.2 API at this point.

--ryan.
Comment 2 Sam Lantinga 2009-12-15 16:42:45 UTC
Hmm, I'd like this to be consistent between the two events, but 'state' is already used by SDL_MouseButtonEvent to mean the new button state.
Comment 3 Nathaniel J Fries 2011-01-07 14:16:37 UTC
Sam, isn't that what he wanted? Or did he want the last button state? If the latter is the case, add an "oldstate" field to the SDL_MouseButtonEvent struct.
Comment 4 Samuel Thibault 2011-01-07 15:55:45 UTC
"state" only tells whether a button is being pressed or released, and
not the status of all the other buttons, which is what I need (and do
not want to have to maintain myself).
Comment 5 Ryan C. Gordon 2018-08-06 21:20:21 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.