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:
parent
7eb840fd42
commit
fd8a32baba
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user