From 9735151f382d0beb1d142d3b3066edac69570136 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Tue, 21 Jul 2009 01:15:25 +0100 Subject: Cygwin/X: Tidy up code for initial native window positioning (avoid a duplicate call to winMultiWindowGetTransientFor()) --- hw/xwin/winmultiwindowwindow.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index e2b5ed291..bb558d1ec 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -524,17 +524,6 @@ winCreateWindowsWindow (WindowPtr pWin) iX = pWin->drawable.x + GetSystemMetrics (SM_XVIRTUALSCREEN); 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; iHeight = pWin->drawable.height; @@ -546,6 +535,17 @@ winCreateWindowsWindow (WindowPtr pWin) 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 */ /* Make it OVERLAPPED in create call since WS_POPUP doesn't support */ -- cgit v1.2.3