aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwindow.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index 600c21ab3..9bc6efdd4 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -108,10 +108,12 @@ winCreateWindowMultiWindow (WindowPtr pWin)
/* Initialize some privates values */
pWinPriv->hRgn = NULL;
pWinPriv->hWnd = NULL;
- pWinPriv->GlCtxWnd = FALSE;
pWinPriv->pScreenPriv = winGetScreenPriv(pWin->drawable.pScreen);
pWinPriv->fXKilled = FALSE;
-
+#ifdef XWIN_GLX_WINDOWS
+ pWinPriv->fWglUsed = FALSE;
+#endif
+
return fResult;
}
@@ -249,7 +251,7 @@ winPositionWindowMultiWindow (WindowPtr pWin, int x, int y)
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
/* Change the position and dimensions of the Windows window */
- if (pWinPriv->GlCtxWnd)
+ if (pWinPriv->fWglUsed)
{
int iWidth=rcNew.right - rcNew.left;
int iHeight=rcNew.bottom - rcNew.top;
@@ -375,9 +377,8 @@ winReparentWindowMultiWindow (WindowPtr pWin, WindowPtr pPriorParent)
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGMULTIWINDOW_DEBUG
- winDebug ("winReparentMultiWindow - pWin: %08x\n", pWin);
-#endif
+ winDebug("winReparentMultiWindow - pWin:%08x XID:0x%x, reparent from pWin:%08x XID:0x%x to pWin:%08x XID:0x%x\n",
+ pWin, pWin->drawable.id, pPriorParent, pPriorParent->drawable.id, pWin->parent, pWin->parent->drawable.id);
WIN_UNWRAP(ReparentWindow);
if (pScreen->ReparentWindow)
@@ -438,7 +439,7 @@ winCreateWindowsWindow (WindowPtr pWin)
winInitMultiWindowClass();
- winDebug ("winCreateWindowsWindow - pWin: %08x\n", pWin);
+ winDebug("winCreateWindowsTopLevelWindow - pWin:%08x XID:0x%x \n", pWin, pWin->drawable.id);
iX = pWin->drawable.x + GetSystemMetrics (SM_XVIRTUALSCREEN);
iY = pWin->drawable.y + GetSystemMetrics (SM_YVIRTUALSCREEN);
@@ -593,9 +594,7 @@ winDestroyWindowsWindow (WindowPtr pWin)
HICON hIcon;
HICON hIconSm;
-#if CYGMULTIWINDOW_DEBUG
- winDebug ("winDestroyWindowsWindow\n");
-#endif
+ winDebug("winDestroyWindowsWindow - pWin:%08x XID:0x%x \n", pWin, pWin->drawable.id);
/* Bail out if the Windows window handle is invalid */
if (pWinPriv->hWnd == NULL)
@@ -619,6 +618,11 @@ winDestroyWindowsWindow (WindowPtr pWin)
winDestroyIcon(hIcon);
winDestroyIcon(hIconSm);
+#ifdef XWIN_GLX_WINDOWS
+ /* No longer note WGL used on this window */
+ pWinPriv->fWglUsed = FALSE;
+#endif
+
/* Process all messages on our queue */
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
@@ -630,9 +634,7 @@ winDestroyWindowsWindow (WindowPtr pWin)
winInDestroyWindowsWindow = oldstate;
-#if CYGMULTIWINDOW_DEBUG
- winDebug ("-winDestroyWindowsWindow\n");
-#endif
+ winDebug("winDestroyWindowsWindow - done\n");
}
@@ -672,7 +674,7 @@ winUpdateWindowsWindow (WindowPtr pWin)
}
else if (hWnd != NULL)
{
- if (pWinPriv->GlCtxWnd)
+ 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 */