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 2172 - Window loses maximized state when activated
Summary: Window loses maximized state when activated
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: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-22 13:54 UTC by norfanin
Modified: 2013-11-08 22:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description norfanin 2013-10-22 13:54:01 UTC
Changeset 357bccc72a1c [1] introduced a new issue that yanks a window out of its maximized state when activated. For example switching to another window with the taskbar and back to the SDL window. The call stack looks like this.

WIN_RaiseWindow      [src\video\windows\sdl_windowswindow.c @ 406]
SDL_RaiseWindow      [src\video\sdl_video.c @ 1769]
SDL_OnWindowRestored [src\video\sdl_video.c @ 2079]
SDL_SendWindowEvent  [src\events\sdl_windowevents.c @ 144]

WIN_RaiseWindow now calls WIN_RestoreWindow which has the effect of removing the maximized state.

I have to activate it twice sometimes to get this effect. Don't know why.

1: http://hg.libsdl.org/SDL/rev/357bccc72a1c
Comment 1 norfanin 2013-10-22 13:56:11 UTC
I forgot the WindowProc call in the call stack before SDL_SendWindowEvent.

WIN_WindowProc   [src\video\windows\sdl_windowsevents.c @ 349]
Comment 2 Sam Lantinga 2013-11-08 22:13:14 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL/rev/94ed2e31a603