diff options
author | marha <marha@users.sourceforge.net> | 2012-08-07 08:28:39 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-07 08:28:39 +0200 |
commit | 666141b21e89c617ca466af62ebcb56dc4f5450c (patch) | |
tree | 4d0cddde47b6d8cbc92395dc2091849f89d68138 /xorg-server/hw/xwin/winmultiwindowwindow.c | |
parent | e158f8fc4a9cf2f884d156ff2dfc0870facfbcba (diff) | |
parent | f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0 (diff) | |
download | vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.tar.gz vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.tar.bz2 vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/hw/xwin/glx/indirect.c
xorg-server/hw/xwin/winclipboardwndproc.c
xorg-server/hw/xwin/winmultiwindowicons.c
xorg-server/hw/xwin/winmultiwindowwindow.c
xorg-server/hw/xwin/winmultiwindowwm.c
xorg-server/hw/xwin/winwin32rootlesswindow.c
xorg-server/hw/xwin/winwindow.h
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwindow.c')
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowwindow.c | 92 |
1 files changed, 43 insertions, 49 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c index 3100ea640..0612ca6a1 100644 --- a/xorg-server/hw/xwin/winmultiwindowwindow.c +++ b/xorg-server/hw/xwin/winmultiwindowwindow.c @@ -553,7 +553,6 @@ winCreateWindowsWindow(WindowPtr pWin) if (iX == CW_USEDEFAULT) { winAdjustXWindow(pWin, hWnd); } - /* Change style back to popup, already placed... */ SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); @@ -644,7 +643,7 @@ winUpdateWindowsWindow(WindowPtr pWin) HWND hWnd = pWinPriv->hWnd; #if CYGMULTIWINDOW_DEBUG - winDebug ("winUpdateWindowsWindow\n"); + winDebug("winUpdateWindowsWindow\n"); #endif /* Check if the Windows window's parents have been destroyed */ @@ -663,45 +662,40 @@ winUpdateWindowsWindow(WindowPtr pWin) UpdateWindow(pWinPriv->hWnd); } else if (hWnd != NULL) { - if (pWinPriv->fWglUsed) - { - /* We do not need to destroy the window but to reparent it and move it to the - correct place when it is an opengl window */ - int offsetx; - int offsety; - HWND hParentWnd; - WindowPtr pParent=pWin->parent; - - while (pParent) - { - winWindowPriv(pParent); - hParentWnd=pWinPriv->hWnd; - if (hParentWnd) - break; - pParent=pParent->parent; - } + if (pWinPriv->fWglUsed) { + /* We do not need to destroy the window but to reparent it and move it to the + correct place when it is an opengl window */ + int offsetx; + int offsety; + HWND hParentWnd; + WindowPtr pParent=pWin->parent; + + while (pParent) { + winWindowPriv(pParent); + hParentWnd=pWinPriv->hWnd; + if (hParentWnd) + break; + pParent=pParent->parent; + } - if (pParent) - { - offsetx=pParent->drawable.x; - offsety=pParent->drawable.y; + if (pParent) { + offsetx=pParent->drawable.x; + offsety=pParent->drawable.y; + } + else { + offsetx=0; + offsety=0; + } + winDebug ("-winUpdateWindowsWindow: %x changing parent to %x and moving to %d,%d\n",pWinPriv->hWnd,hParentWnd,pWin->drawable.x-offsetx,pWin->drawable.y-offsety); + SetParent(pWinPriv->hWnd,hParentWnd); + SetWindowPos(pWinPriv->hWnd,NULL,pWin->drawable.x-offsetx,pWin->drawable.y-offsety,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_SHOWWINDOW); } - else - { - offsetx=0; - offsety=0; + else { + /* Destroy the Windows window if its parents are destroyed */ + /* First check if we need to release the DC when it is an opengl window */ + winDestroyWindowsWindow (pWin); + assert (pWinPriv->hWnd == NULL); } - winDebug ("-winUpdateWindowsWindow: %x changing parent to %x and moving to %d,%d\n",pWinPriv->hWnd,hParentWnd,pWin->drawable.x-offsetx,pWin->drawable.y-offsety); - SetParent(pWinPriv->hWnd,hParentWnd); - SetWindowPos(pWinPriv->hWnd,NULL,pWin->drawable.x-offsetx,pWin->drawable.y-offsety,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_SHOWWINDOW); - } - else - { - /* Destroy the Windows window if its parents are destroyed */ - /* First check if we need to release the DC when it is an opengl window */ - winDestroyWindowsWindow (pWin); - assert (pWinPriv->hWnd == NULL); - } } #if CYGMULTIWINDOW_DEBUG @@ -723,7 +717,7 @@ winGetWindowID(WindowPtr pWin) FindClientResourcesByType(c, RT_WINDOW, winFindWindow, &wi); #if CYGMULTIWINDOW_DEBUG - winDebug ("winGetWindowID - Window ID: %d\n", wi.id); + winDebug("winGetWindowID - Window ID: %d\n", wi.id); #endif return wi.id; @@ -758,11 +752,11 @@ winReorderWindowsMultiWindow(void) DWORD dwCurrentProcessID = GetCurrentProcessId(); DWORD dwWindowProcessID = 0; - winDebug ("winReorderWindowsMultiWindow\n"); + winDebug("winReorderWindowsMultiWindow\n"); if (fRestacking) { /* It is a recusive call so immediately exit */ - winDebug ("winReorderWindowsMultiWindow - " + winDebug("winReorderWindowsMultiWindow - " "exit because fRestacking == TRUE\n"); return; } @@ -816,7 +810,7 @@ winMinimizeWindow(Window id) winPrivScreenPtr pScreenPriv = NULL; winScreenInfo *pScreenInfo = NULL; - winDebug ("winMinimizeWindow\n"); + winDebug("winMinimizeWindow\n"); dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient, DixUnknownAccess); @@ -859,7 +853,7 @@ winCopyWindowMultiWindow(WindowPtr pWin, DDXPointRec oldpt, RegionPtr oldRegion) winScreenPriv(pScreen); - winDebug ("CopyWindowMultiWindow\n"); + winDebug("CopyWindowMultiWindow\n"); WIN_UNWRAP(CopyWindow); (*pScreen->CopyWindow) (pWin, oldpt, oldRegion); @@ -877,7 +871,7 @@ winMoveWindowMultiWindow(WindowPtr pWin, int x, int y, winScreenPriv(pScreen); - winDebug ("MoveWindowMultiWindow to (%d, %d)\n", x, y); + winDebug("MoveWindowMultiWindow to (%d, %d)\n", x, y); WIN_UNWRAP(MoveWindow); (*pScreen->MoveWindow) (pWin, x, y, pSib, kind); @@ -895,7 +889,7 @@ winResizeWindowMultiWindow(WindowPtr pWin, int x, int y, unsigned int w, winScreenPriv(pScreen); - winDebug ("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h); + winDebug("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h); WIN_UNWRAP(ResizeWindow); (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); @@ -925,10 +919,10 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd) #define WIDTH(rc) (rc.right - rc.left) #define HEIGHT(rc) (rc.bottom - rc.top) - winDebug ("winAdjustXWindow\n"); + winDebug("winAdjustXWindow\n"); if (IsIconic(hwnd)) { - winDebug ("\timmediately return because the window is iconized\n"); + winDebug("\timmediately return because the window is iconized\n"); /* * If the Windows window is minimized, its WindowRect has * meaningless values so we don't adjust X window to it. @@ -963,7 +957,7 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd) if (EqualRect(&rcDraw, &rcWin)) { /* Bail if no adjust is needed */ - winDebug ("\treturn because already adjusted\n"); + winDebug("\treturn because already adjusted\n"); return 0; } @@ -983,7 +977,7 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd) vlist[1] = pDraw->y + dY - wBorderWidth(pWin); vlist[2] = pDraw->width + dW; vlist[3] = pDraw->height + dH; - winDebug ("\tConfigureWindow to (%ld, %ld) - %ldx%ld\n", vlist[0], vlist[1], + winDebug("\tConfigureWindow to (%ld, %ld) - %ldx%ld\n", vlist[0], vlist[1], vlist[2], vlist[3]); return ConfigureWindow(pWin, CWX | CWY | CWWidth | CWHeight, vlist, wClient(pWin)); |