aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwindow.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-07-27 15:20:33 +0200
committermarha <marha@users.sourceforge.net>2011-07-27 15:20:33 +0200
commit5d81ad3c22666408fa57f6a5373acfaca693d277 (patch)
treec64c72b3ae1dd2b0efde13b64c343ed07b651d76 /xorg-server/hw/xwin/winmultiwindowwindow.c
parent845609f1f5d2d7c6bca8779d2457115a7ba3c807 (diff)
downloadvcxsrv-5d81ad3c22666408fa57f6a5373acfaca693d277.tar.gz
vcxsrv-5d81ad3c22666408fa57f6a5373acfaca693d277.tar.bz2
vcxsrv-5d81ad3c22666408fa57f6a5373acfaca693d277.zip
Solvedm problem of window not taking the default window position when
created.
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwindow.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index 9bc6efdd4..c73d192f3 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -555,15 +555,20 @@ winCreateWindowsWindow (WindowPtr pWin)
if (hIcon) SendMessage (hWnd, WM_SETICON, ICON_BIG, (LPARAM) hIcon);
if (hIconSmall) SendMessage (hWnd, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
+ /* If we asked the native WM to place the window, synchronize the X window position.
+ Do this before the next SetWindowPos because this one is generating a WM_STYLECHANGED
+ message which is causing a window move, which is wrong if the Xwindow does not
+ have the correct coordinates yet */
+ if (iX == CW_USEDEFAULT)
+ {
+ winAdjustXWindow(pWin, hWnd);
+ }
+
/* Change style back to popup, already placed... */
SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
SetWindowPos (hWnd, 0, 0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- /* If we asked the native WM to place the window, synchronize the X window position */
- if (iX == CW_USEDEFAULT)
- winAdjustXWindow(pWin, hWnd);
-
/* Make sure it gets the proper system menu for a WS_POPUP, too */
GetSystemMenu (hWnd, TRUE);