aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-10-13 06:46:08 +0000
committermarha <marha@users.sourceforge.net>2010-10-13 06:46:08 +0000
commit67a196d6ba16dc8605235b81a6828009893f35f4 (patch)
treeafa1489adf3edacbf7c3c52c681afca8463ff34d
parent80654c5acd772c90d81815747e6c5fee4ee4fe11 (diff)
downloadvcxsrv-67a196d6ba16dc8605235b81a6828009893f35f4.tar.gz
vcxsrv-67a196d6ba16dc8605235b81a6828009893f35f4.tar.bz2
vcxsrv-67a196d6ba16dc8605235b81a6828009893f35f4.zip
multiwindow: only make the window visible when it is not inputonly
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index 5e8c51c30..36640faec 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -452,12 +452,18 @@ winCreateWindowsWindow (WindowPtr pWin)
iWidth = pWin->drawable.width;
iHeight = pWin->drawable.height;
- /* ensure window actually ends up somewhere visible */
- if (iX > GetSystemMetrics (SM_CXVIRTUALSCREEN))
- iX = CW_USEDEFAULT;
+ /* If it's an InputOutput window, and so is going to end up being made visible,
+ make sure the window actually ends up somewhere where it will be visible */
+ if (pWin->drawable.class != InputOnly)
+ {
+ if ((iX < GetSystemMetrics (SM_XVIRTUALSCREEN)) || (iX > GetSystemMetrics (SM_CXVIRTUALSCREEN)))
+ iX = CW_USEDEFAULT;
+
+ if ((iY < GetSystemMetrics (SM_YVIRTUALSCREEN)) || (iY > GetSystemMetrics (SM_CYVIRTUALSCREEN)))
+ iY = CW_USEDEFAULT;
+ }
- if (iY > GetSystemMetrics (SM_CYVIRTUALSCREEN))
- iY = CW_USEDEFAULT;
+ winDebug("winCreateWindowsWindow - %dx%d @ %dx%d\n", iWidth, iHeight, iX, iY);
if (winMultiWindowGetTransientFor (pWin, &pDaddy))
{
@@ -629,7 +635,8 @@ winUpdateWindowsWindow (WindowPtr pWin)
}
/* Display the window without activating it */
- ShowWindow (pWinPriv->hWnd, SW_SHOWNOACTIVATE);
+ if (pWin->drawable.class != InputOnly)
+ ShowWindow (pWinPriv->hWnd, SW_SHOWNOACTIVATE);
/* Send first paint message */
UpdateWindow (pWinPriv->hWnd);