summaryrefslogtreecommitdiff
path: root/hw/xwin
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-03-10 20:05:46 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-03-10 20:05:46 +0000
commit8653db5d57199d53c9b2b993c35a7b70c8949989 (patch)
tree00f39c0d3e3bd26748d9f88e573f267ae0001887 /hw/xwin
parent522628f25b4a075c8daf547991ea5b80c5efe9c7 (diff)
Force rebuilding of window stack if a window changes it's state from
minimized.
Diffstat (limited to 'hw/xwin')
-rw-r--r--hw/xwin/ChangeLog6
-rwxr-xr-xhw/xwin/winmultiwindowwndproc.c18
2 files changed, 23 insertions, 1 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index 6f4e0977d..ed7f7b200 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-10 Alexander Gottwald <ago at freedesktop dot org>
+
+ * winmultiwindowwndproc.c:
+ Force rebuilding of window stack if a window changes it's state from
+ minimized.
+
2005-03-07 Alexander Gottwald <ago at freedesktop dot org>
* winmultiwindowwndproc.c:
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 398751122..a732d5307 100755
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -301,6 +301,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
winWMMessageRec wmMsg;
Bool fWMMsgInitialized = FALSE;
static Bool s_fTracking = FALSE;
+ Bool needRestack = FALSE;
+ LRESULT ret;
#if CYGDEBUG
winDebugWin32Message("winTopLevelWindowProc", hwnd, message, wParam, lParam);
@@ -403,6 +405,13 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
/* Don't pass customized menus to DefWindowProc */
return 0;
}
+ if (wParam == SC_RESTORE || wParam == SC_MAXIMIZE)
+ {
+ WINDOWPLACEMENT wndpl;
+ wndpl.length = sizeof(wndpl);
+ if (GetWindowPlacement(hwnd, &wndpl) && wndpl.showCmd == SW_SHOWMINIMIZED)
+ needRestack = TRUE;
+ }
break;
case WM_INITMENU:
@@ -1010,5 +1019,12 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
break;
}
- return DefWindowProc (hwnd, message, wParam, lParam);
+ ret = DefWindowProc (hwnd, message, wParam, lParam);
+ /*
+ * If the window was minized we get the stack change before the window is restored
+ * and so it gets lost. Ensure there stacking order is correct.
+ */
+ if (needRestack)
+ winReorderWindowsMultiWindow();
+ return ret;
}