diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-08-20 18:02:31 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-08-20 18:02:31 +0100 |
commit | 1272ef4bf87d27af4f81c5a7c0359fa4b300f0ba (patch) | |
tree | 85a61ee14f4480a37401549da948387ba95ec93d | |
parent | b0d3e709e6284e219850dc5e63384167f79bfb9e (diff) |
Don't unmap windows on SWP_HIDEWINDOWcygwin-patches-for-1.17
unmapping the X window on SWP_HIDEWINDOW makes the window inaccessible
after a virtual desktop change with Dexpot.
-rw-r--r-- | hw/xwin/winmultiwindowwndproc.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 9c2423a7a..7fd0a0acf 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 |