From edb32562fa496c488f0487efc792b6a33c9ab22c Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 17 Sep 2010 12:18:47 +0000 Subject: Solved problem of resizing opengl window when it is not the main window in multiwindow mode --- xorg-server/hw/xwin/winmultiwindowwindow.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'xorg-server') diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c index 81d368b5c..44fdd8ac3 100644 --- a/xorg-server/hw/xwin/winmultiwindowwindow.c +++ b/xorg-server/hw/xwin/winmultiwindowwindow.c @@ -254,10 +254,21 @@ winPositionWindowMultiWindow (WindowPtr pWin, int x, int y) rcNew.right - rcNew.left, rcNew.bottom - rcNew.top); /* Change the position and dimensions of the Windows window */ - MoveWindow (hWnd, - rcNew.left, rcNew.top, - rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, - TRUE); + if (pWinPriv->GlCtxWnd) + { + int iWidth=rcNew.right - rcNew.left; + int iHeight=rcNew.bottom - rcNew.top; + ScreenToClient(GetParent(hWnd), (LPPOINT)&rcNew); + MoveWindow (hWnd, + rcNew.left, rcNew.top, + iWidth, iHeight, + TRUE); + } + else + MoveWindow (hWnd, + rcNew.left, rcNew.top, + rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, + TRUE); } else { -- cgit v1.2.3