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-11-09 20:33:41 +0000 |
commit | 6dbf8f27c885ea3a761548183fb00ba3df2df553 (patch) | |
tree | 8ab8ee86eef780a34753668c80ead1be713fe5ce | |
parent | 28eb61fc04811bb9bbb523e0a252933313bb16ce (diff) |
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>
-rw-r--r-- | hw/xwin/winmultiwindowwindow.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 447c99b56..8b91296f7 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -512,21 +512,10 @@ 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; - if (winMultiWindowGetTransientFor (pWin, &pDaddy)) + if (winMultiWindowGetTransientFor (pWin, &pDaddy)) { if (pDaddy) { @@ -534,6 +523,18 @@ 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 */ |