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 2776 - SDL_ShowMessageBox causes modifier keys to stick (patch included)
Summary: SDL_ShowMessageBox causes modifier keys to stick (patch included)
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Linux
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.4, triage-2.0.4
Depends on:
Blocks:
 
Reported: 2014-11-05 09:51 UTC by Sean McKean
Modified: 2015-05-27 00:50 UTC (History)
1 user (show)

See Also:


Attachments
patch to clear keyboard state before showing message box (466 bytes, patch)
2014-11-05 09:51 UTC, Sean McKean
Details | Diff
revised patch (393 bytes, patch)
2014-11-05 09:56 UTC, Sean McKean
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean McKean 2014-11-05 09:51:33 UTC
Created attachment 1925 [details]
patch to clear keyboard state before showing message box

When calling SDL_ShowMessageBox with a keyboard modifier held (i.e. showing the box when holding and testing for Shift-Z), the message box receives events normally, but if the modifier key is released with the box still opened, the mod state remains pressed even after the box is dismissed.

The proposed patch file simply calls SDL_ResetKeyboard() to clear all held state before showing the dialog.

Tested with Ubuntu / Gnome (X11).
Comment 1 Sean McKean 2014-11-05 09:56:56 UTC
Created attachment 1926 [details]
revised patch
Comment 2 Ryan C. Gordon 2015-02-19 05:22:22 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though!
Comment 3 Ryan C. Gordon 2015-04-07 04:57:54 UTC
(sorry if you get a lot of copies of this email, I'm marking several bugs at once)

Marking bugs for the (mostly) final 2.0.4 TODO list. This means we're hoping to resolve this bug before 2.0.4 ships if possible. In a perfect world, the open bug count with the target-2.0.4 keyword is zero when we ship.

(Note that closing a bug report as WONTFIX, INVALID or WORKSFORME might still happen.)

--ryan.
Comment 4 Ryan C. Gordon 2015-05-27 00:50:00 UTC
This patch is now https://hg.libsdl.org/SDL/rev/cd237569d0f6, thanks!

--ryan.