Cygwin/X: Window placement refinement for multiwindow mode

Window placement refinement for multiwindow mode, ensure a window actually
ends up somewhere visible if it tries to create itself offscreen (which
can happen for e.g. if it has a stored position from a different sized
display)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon TURNEY 2009-06-19 21:14:39 +01:00
parent 7eb840fd42
commit fd8a32baba

View File

@ -515,6 +515,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;
if (winMultiWindowGetTransientFor (pWin, &pDaddy))
{
if (pDaddy)