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-11-11 11:57:17 +0000 |
commit | b44b06002f98a843dbc8a5b213d8c00f0c1a20ca (patch) | |
tree | 74151ffc9769176da4049bf175122e2824794918 | |
parent | 60da794433b4f820f2fc55fc7d7197ece160f9fc (diff) |
Don't unmap windows on SWP_HIDEWINDOW
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 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 |