diff options
author | Colin Harrison <colin.harrison@virgin.net> | 2009-07-21 01:15:25 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-10-16 20:58:45 +0100 |
commit | 9735151f382d0beb1d142d3b3066edac69570136 (patch) | |
tree | 92c50d92c7dd770bdc80428047441fc4c97fceb3 | |
parent | a50ebcf45f187bc3e141e83a69217d564a575ba5 (diff) |
Cygwin/X: Tidy up code for initial native window positioning (avoid a duplicate call to winMultiWindowGetTransientFor())
-rw-r--r-- | hw/xwin/winmultiwindowwindow.c | 22 |
1 files 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 */ |