Commit 38a1f5c6 authored by Jon TURNEY's avatar Jon TURNEY

Cygwin/X: Don't make InputOnly windows visible

Signed-off-by: default avatarJon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: default avatarColin Harrison <colin.harrison@virgin.net>
Tested-by: default avatarColin Harrison <colin.harrison@virgin.net>
parent bd288c34
......@@ -506,12 +506,16 @@ 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_CYVIRTUALSCREEN))
iY = CW_USEDEFAULT;
if ((iY < GetSystemMetrics (SM_YVIRTUALSCREEN)) || (iY > GetSystemMetrics (SM_CYVIRTUALSCREEN)))
iY = CW_USEDEFAULT;
}
if (winMultiWindowGetTransientFor (pWin, &pDaddy))
{
......@@ -666,7 +670,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment