[FIXED] Windows: Activating a maximized window will un-maximize/restore it

Started by Simon Felix, February 06, 2012, 01:39:56

Previous topic - Next topic

Simon Felix

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
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/

Matzon

looks good, dont think this should trigger anything in XP. Will ignore the redoMakeContextCurrent stuff ;)
Will test and apply tonight

Simon Felix

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...
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/

Matzon