[PATCH 10/13] Cygwin/X: Check window placement to ensure window actually ends up somewhere visible
Jon TURNEY
jon.turney at dronecode.org.uk
Wed Jan 7 12:04:05 PST 2009
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
hw/xwin/winmultiwindowwindow.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 2399d5a..da8a0a5 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -519,6 +519,13 @@ 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 (iY > GetSystemMetrics (SM_CYVIRTUALSCREEN))
+ iY = CW_USEDEFAULT;
+
winSelectIcons(pWin, &hIcon, &hIconSmall);
/* Set standard class name prefix so we can identify window easily */
--
1.6.0.4
More information about the xorg
mailing list