mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-26 06:04:49 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user