Xming: Tidy up code for initial native window positioning
Tidy up code for initial native window positioning and avoid a duplicate call to winMultiWindowGetTransientFor() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
28eb61fc04
commit
6dbf8f27c8
|
@ -512,21 +512,10 @@ winCreateWindowsWindow (WindowPtr pWin)
|
||||||
iX = pWin->drawable.x + GetSystemMetrics (SM_XVIRTUALSCREEN);
|
iX = pWin->drawable.x + GetSystemMetrics (SM_XVIRTUALSCREEN);
|
||||||
iY = pWin->drawable.y + GetSystemMetrics (SM_YVIRTUALSCREEN);
|
iY = pWin->drawable.y + GetSystemMetrics (SM_YVIRTUALSCREEN);
|
||||||
|
|
||||||
/* Default positions if none specified */
|
|
||||||
if (!winMultiWindowGetWMNormalHints(pWin, &hints))
|
|
||||||
hints.flags = 0;
|
|
||||||
if ( !(hints.flags & (USPosition|PPosition)) &&
|
|
||||||
!winMultiWindowGetTransientFor (pWin, NULL) &&
|
|
||||||
!pWin->overrideRedirect )
|
|
||||||
{
|
|
||||||
iX = CW_USEDEFAULT;
|
|
||||||
iY = CW_USEDEFAULT;
|
|
||||||
}
|
|
||||||
|
|
||||||
iWidth = pWin->drawable.width;
|
iWidth = pWin->drawable.width;
|
||||||
iHeight = pWin->drawable.height;
|
iHeight = pWin->drawable.height;
|
||||||
|
|
||||||
if (winMultiWindowGetTransientFor (pWin, &pDaddy))
|
if (winMultiWindowGetTransientFor (pWin, &pDaddy))
|
||||||
{
|
{
|
||||||
if (pDaddy)
|
if (pDaddy)
|
||||||
{
|
{
|
||||||
|
@ -534,6 +523,18 @@ winCreateWindowsWindow (WindowPtr pWin)
|
||||||
if (hFore && (pDaddy != (WindowPtr)GetProp(hFore, WIN_WID_PROP))) hFore = NULL;
|
if (hFore && (pDaddy != (WindowPtr)GetProp(hFore, WIN_WID_PROP))) hFore = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Default positions if none specified */
|
||||||
|
if (!winMultiWindowGetWMNormalHints(pWin, &hints))
|
||||||
|
hints.flags = 0;
|
||||||
|
if (!(hints.flags & (USPosition|PPosition)) &&
|
||||||
|
!pWin->overrideRedirect)
|
||||||
|
{
|
||||||
|
iX = CW_USEDEFAULT;
|
||||||
|
iY = CW_USEDEFAULT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Create the window */
|
/* Create the window */
|
||||||
/* Make it OVERLAPPED in create call since WS_POPUP doesn't support */
|
/* Make it OVERLAPPED in create call since WS_POPUP doesn't support */
|
||||||
|
|
Loading…
Reference in New Issue