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 3650 - [Patch] Add support for parented message boxes on Windows so that they retain exclusive focus at all times!
Summary: [Patch] Add support for parented message boxes on Windows so that they retain...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: All Windows (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-13 00:50 UTC by Ismael Ferreras Morezuelas (Swyter)
Modified: 2017-05-27 04:33 UTC (History)
2 users (show)

See Also:


Attachments
The patch itself, pretty tiny! (1.07 KB, patch)
2017-05-13 00:50 UTC, Ismael Ferreras Morezuelas (Swyter)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ismael Ferreras Morezuelas (Swyter) 2017-05-13 00:50:07 UTC
Created attachment 2733 [details]
The patch itself, pretty tiny!

Hi there! I have been meaning to fix this one for a while.

The fact that at the moment clicking a crashed window hides the messagebox with all the handy information it has to offer about the cause of the problem has probably caused additional rage for more than one, I bet.

This three-line patch finds if the current messagebox has an assigned parent window and if that's the case grabs its window handle and uses it on dialog creation. Windows will then give exclusive focus to that new dialog whenever someone clicks over the crashed window in despair. So that we can at least fail with style.


Windows-only at the moment, even if I believe that the Linux version has similar problems. Maybe I can get around and fix that one after getting this patch through.

Let me know what you think! I can rework it a bit more, as I don't want to ship a forked version!


PS: SDL2 is pretty neat and straightforward to use. Thanks so much! :)
Comment 1 Ryan C. Gordon 2017-05-27 04:33:36 UTC
This patch is now https://hg.libsdl.org/SDL/rev/c5346d5c3c79, thanks!

--ryan.