summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2010-10-12 17:12:02 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2011-04-27 14:22:41 +0100
commit38a1f5c613a48ef9fd6ba043bc3028f487750d3a (patch)
treefe6cf2c74070af175da12e16ea334524a9bc36b9
parentbd288c3458bc1ba2cbb4c8416e5b2dfd849581e6 (diff)
Cygwin/X: Don't make InputOnly windows visible
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net>
-rw-r--r--hw/xwin/winmultiwindowwindow.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 61305e19d..21b818b89 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -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);