LWJGL Forum

Archive => Resolved Bugs/RFE => Topic started by: Simon Felix on February 06, 2012, 01:39:56

Title: [FIXED] Windows: Activating a maximized window will un-maximize/restore it
Post by: Simon Felix on February 06, 2012, 01:39:56
Hello again everyone

Steps to repro:
1. Maximize LWJGL window
2. Bring another window to the foreground (click the taskbar for example)
3. Bring the LWJGL window again to the foreground (click it for example)

Result:
LWJGL window's state is "restored" instead of "maximized".

Expected result:
Window should stay maximized.

I attached a patch to fix the bug. However I only tested it under Windows 8. Will test tomorrow under Windows 7. But I have no XP at the moment. Can somebody else check that it works properly with XP?

Cheers,
Simon
Title: Re: [BUG] Windows: Activating a maximized window will un-maximize/restore it
Post by: Matzon on February 06, 2012, 07:23:08
looks good, dont think this should trigger anything in XP. Will ignore the redoMakeContextCurrent stuff ;)
Will test and apply tonight
Title: Re: [BUG] Windows: Activating a maximized window will un-maximize/restore it
Post by: Simon Felix on February 06, 2012, 17:36:56
It works also under Windows 7.

I renamed the "did_maximize" variable because the code might be confusing to read otherwise. The variable "did_maximize" is true when the window was restored to the "restored" or "maximized" window state. Now I added another variable called "maximized" that says whether the window was/is in the "maximized" or "restored" state (before minimizing). Just wanted to make the code clearer...
Title: Re: [FIXED] Windows: Activating a maximized window will un-maximize/restore it
Post by: Matzon on February 06, 2012, 20:37:40
applied in r3741, thanks