summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2015-08-20 18:02:31 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2015-11-04 02:31:10 +0000
commitcda965c52e601760641e5d5e83694466399f4f35 (patch)
treeb6dd2e56c65a529816aa930154b2d0a2f0730a29
parent8d08055b87b552b12557b4ec3a97ea118eb462db (diff)
Don't unmap windows on SWP_HIDEWINDOWcygwin-patches-for-1.18-pre-xcbification
unmapping the X window on SWP_HIDEWINDOW makes the window inaccessible after a virtual desktop change with Dexpot.
-rw-r--r--hw/xwin/winmultiwindowwndproc.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 9d153e459..6f3291175 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -978,14 +978,18 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
winStartMousePolling(s_pScreenPriv);
}
- /* Window is being hidden */
- if (pWinPos->flags & SWP_HIDEWINDOW) {
- /* Tell our Window Manager thread to unmap the window */
- wmMsg.msg = WM_WM_UNMAP;
-
- if (fWMMsgInitialized)
- winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg);
- }
+ /*
+ We don't react to SWP_HIDEWINDOW indicating window is being hidden in
+ a symmetrical way (i.e. by sending WM_WM_UNMAP)
+
+ If the cause of the window being hidden is the X windows being unmapped,
+ (WM_STATE has changed to WithdrawnState), then the window has already
+ been unmapped.
+
+ Virtual desktop software (like VirtuaWin or Dexpot) uses SWP_HIDEWINDOW
+ to hide windows on other desktops. We mustn't unmap the X window in
+ that situation, as it becomes inaccessible.
+ */
}
/*
* Pass the message to DefWindowProc to let the function