hw/xwin: Add a flag to track which windows have been drawn to using WGL.
Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
98c6d91a48
commit
b0b54338e2
|
@ -16,7 +16,11 @@ if XWIN_MULTIWINDOWEXTWM
|
|||
DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
|
||||
endif
|
||||
|
||||
DEFS = $(DEFS_MULTIWINDOW) $(DEFS_MULTIWINDOWEXTWM)
|
||||
if XWIN_GLX_WINDOWS
|
||||
DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS
|
||||
endif
|
||||
|
||||
DEFS = $(DEFS_MULTIWINDOW) $(DEFS_MULTIWINDOWEXTWM) $(DEFS_GLX_WINDOWS)
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/miext/rootless
|
||||
|
||||
|
|
|
@ -61,6 +61,9 @@ HWND winGetWindowInfo(WindowPtr pWin)
|
|||
{
|
||||
/* copy window handle */
|
||||
hwnd = pWinPriv->hWnd;
|
||||
|
||||
/* mark GLX active on that hwnd */
|
||||
pWinPriv->fWglUsed = TRUE;
|
||||
}
|
||||
|
||||
return hwnd;
|
||||
|
|
|
@ -110,7 +110,10 @@ winCreateWindowMultiWindow (WindowPtr pWin)
|
|||
pWinPriv->hWnd = NULL;
|
||||
pWinPriv->pScreenPriv = winGetScreenPriv(pWin->drawable.pScreen);
|
||||
pWinPriv->fXKilled = FALSE;
|
||||
|
||||
#ifdef XWIN_GLX_WINDOWS
|
||||
pWinPriv->fWglUsed = FALSE;
|
||||
#endif
|
||||
|
||||
return fResult;
|
||||
}
|
||||
|
||||
|
@ -652,6 +655,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))
|
||||
{
|
||||
|
|
|
@ -472,6 +472,20 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef XWIN_GLX_WINDOWS
|
||||
if (pWinPriv->fWglUsed)
|
||||
{
|
||||
/*
|
||||
For regions which are being drawn by GL, the shadow framebuffer doesn't have the
|
||||
correct bits, so don't bitblt from the shadow framebuffer
|
||||
|
||||
XXX: For now, just leave it alone, but ideally we want to send an expose event to
|
||||
the window so it really redraws the affected region...
|
||||
*/
|
||||
ValidateRect(hwnd, &(ps.rcPaint));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
/* Try to copy from the shadow buffer */
|
||||
if (!BitBlt (hdcUpdate,
|
||||
ps.rcPaint.left, ps.rcPaint.top,
|
||||
|
|
|
@ -80,6 +80,9 @@ typedef struct
|
|||
winPrivScreenPtr pScreenPriv;
|
||||
Bool fXKilled;
|
||||
HDWP hDwp;
|
||||
#ifdef XWIN_GLX_WINDOWS
|
||||
Bool fWglUsed;
|
||||
#endif
|
||||
|
||||
/* Privates used by primary fb DirectDraw server */
|
||||
LPDDSURFACEDESC pddsdPrimary;
|
||||
|
|
Loading…
Reference in New Issue
Block a user