Properly return window state
Modified: trunk/reactos/subsys/win32k/ntuser/window.c
_____
Modified: trunk/reactos/subsys/win32k/ntuser/window.c
--- trunk/reactos/subsys/win32k/ntuser/window.c 2005-10-28 15:33:05 UTC
(rev 18834)
+++ trunk/reactos/subsys/win32k/ntuser/window.c 2005-10-28 18:48:23 UTC
(rev 18835)
@@ -3554,7 +3554,23 @@
}
Safepl.flags = 0;
- Safepl.showCmd = ((Window->Flags & WINDOWOBJECT_RESTOREMAX) ?
SW_MAXIMIZE : SW_SHOWNORMAL);
+ if (0 == (Window->Style & WS_VISIBLE))
+ {
+ Safepl.showCmd = SW_HIDE;
+ }
+ else if (0 != (Window->Flags & WINDOWOBJECT_RESTOREMAX) ||
+ 0 != (Window->Style & WS_MAXIMIZE))
+ {
+ Safepl.showCmd = SW_MAXIMIZE;
+ }
+ else if (0 != (Window->Style & WS_MINIMIZE))
+ {
+ Safepl.showCmd = SW_MINIMIZE;
+ }
+ else if (0 != (Window->Style & WS_MINIMIZE))
+ {
+ Safepl.showCmd = SW_SHOWNORMAL;
+ }
Size.x = Window->WindowRect.left;
Size.y = Window->WindowRect.top;