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 2439 - Add hint to stop window from being raised in OnWindowRestored
Summary: Add hint to stop window from being raised in OnWindowRestored
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.1
Hardware: All All
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-08 17:05 UTC by Katie Stafford
Modified: 2014-04-18 05:56 UTC (History)
0 users

See Also:


Attachments
Quick patch (1.70 KB, text/plain)
2014-03-08 17:05 UTC, Katie Stafford
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Katie Stafford 2014-03-08 17:05:11 UTC
Created attachment 1586 [details]
Quick patch

SDL_OnWindowRestored currently calls SDL_RaiseWindow, which causes undesired behavior: if the application window is in the background, and the user switches to another desktop, then back, the application brings itself to the foreground.

I'm sure there must be a reason why this needs to happen on some platforms, but it would be nice to have a hint to turn it off.
Comment 1 Sam Lantinga 2014-03-27 16:33:39 UTC
Can you double check that this fixes your issue?
http://hg.libsdl.org/SDL/rev/79527cb2cf8a
Comment 2 Katie Stafford 2014-03-28 03:28:34 UTC
Yes, that would solve the issue. If it gets re-added in the future, I still think a hint to disable it wouldn't hurt.
Comment 3 Sam Lantinga 2014-04-18 05:56:35 UTC
Okay, let's see if this looks good in the wild.