aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwindow.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-01-05 16:05:20 +0000
committermarha <marha@users.sourceforge.net>2010-01-05 16:05:20 +0000
commite2908de4a023410ee6b72ccc5c439f96deaeeac1 (patch)
treed4e1b4f964b2a1c23a8e7a87388600727fff8dc2 /xorg-server/hw/xwin/winmultiwindowwindow.c
parent4b1326f06330c00501dd84100ed3a1987e2fa631 (diff)
downloadvcxsrv-e2908de4a023410ee6b72ccc5c439f96deaeeac1.tar.gz
vcxsrv-e2908de4a023410ee6b72ccc5c439f96deaeeac1.tar.bz2
vcxsrv-e2908de4a023410ee6b72ccc5c439f96deaeeac1.zip
Multiwindow: solved problem of window not having the correct size.
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwindow.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index a3ac6466a..6e5df2b3a 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -408,6 +408,19 @@ winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib)
}
+static void ClientResize(HWND hWnd, int nWidth, int nHeight)
+{
+ RECT rcClient, rcWindow;
+ POINT ptDiff;
+
+ GetClientRect(hWnd, &rcClient);
+ GetWindowRect(hWnd, &rcWindow);
+ ptDiff.x = (rcWindow.right - rcWindow.left) - rcClient.right;
+ ptDiff.y = (rcWindow.bottom - rcWindow.top) - rcClient.bottom;
+ MoveWindow(hWnd,rcWindow.left, rcWindow.top, nWidth + ptDiff.x, nHeight + ptDiff.y, TRUE);
+}
+
+
/*
* winCreateWindowsWindow - Create a Windows window associated with an X window
*/
@@ -496,6 +509,8 @@ winCreateWindowsWindow (WindowPtr pWin)
/* Make sure it gets the proper system menu for a WS_POPUP, too */
GetSystemMenu (hWnd, TRUE);
+ ClientResize(hWnd,iWidth,iHeight);
+
/* Cause any .XWinrc menus to be added in main WNDPROC */
PostMessage (hWnd, WM_INIT_SYS_MENU, 0, 0);