diff options
Diffstat (limited to 'xorg-server/hw')
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowwindow.c | 15 |
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);
|