diff --git a/composite/compint.h b/composite/compint.h index 78a138a74..81b4027ec 100644 --- a/composite/compint.h +++ b/composite/compint.h @@ -49,6 +49,12 @@ #include #include +/* + * enable this for debugging + + #define COMPOSITE_DEBUG + */ + typedef struct _CompClientWindow { struct _CompClientWindow *next; XID id; @@ -118,10 +124,6 @@ typedef struct _CompScreen { XID alternateVisuals[NUM_COMP_ALTERNATE_VISUALS]; } CompScreenRec, *CompScreenPtr; -#define HasCompRedirect(w) (wPixmap(w) != wPixmap(w->parent)) -#define wScreen(w) ((w)->drawable.pScreen) -#define wPixmap(w) (*(wScreen(w)->GetWindowPixmap) (w)) - extern int CompScreenPrivateIndex; extern int CompWindowPrivateIndex; extern int CompSubwindowsPrivateIndex; @@ -192,11 +194,11 @@ compScreenInit (ScreenPtr pScreen); * compwindow.c */ -#ifdef NDEBUG -#define compCheckTree(s) -#else +#ifdef COMPOSITE_DEBUG void compCheckTree (ScreenPtr pScreen); +#else +#define compCheckTree(s) #endif void diff --git a/composite/compwindow.c b/composite/compwindow.c index f630008a6..f8945bdc4 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -27,7 +27,7 @@ #endif #include "compint.h" -#ifndef NDEBUG +#ifdef COMPOSITE_DEBUG static int compCheckWindow (WindowPtr pWin, pointer data) { @@ -151,8 +151,10 @@ compPositionWindow (WindowPtr pWin, int x, int y) * compCheckRedirect (pWin); */ +#ifdef COMPOSITE_DEBUG if (pWin->redirectDraw != (pWin->viewable && (GetCompWindow(pWin) != NULL))) abort (); +#endif if (pWin->redirectDraw) { PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); diff --git a/miext/cw/cw.c b/miext/cw/cw.c index aa32033de..c72db3809 100644 --- a/miext/cw/cw.c +++ b/miext/cw/cw.c @@ -164,11 +164,6 @@ cwDestroyGCPrivate(GCPtr pGC) FreeGC(pPriv->pBackingGC, (XID)0); setCwGC (pGC, pPriv->wrapFuncs); xfree((pointer)pPriv); - /* The ChangeGC and ValidateGCs on the window haven't been passed down the - * stack, so report all state being changed. - */ - pGC->stateChanges |= (1 << (GCLastBit + 1)) - 1; - (*pGC->funcs->ChangeGC)(pGC, (1 << (GCLastBit + 1)) - 1); } /* GCFuncs wrappers. These only get used when the drawable is a window with a @@ -747,6 +742,10 @@ cwGetWindowPixmap (WindowPtr pWin) static void cwSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap) { + ScreenPtr pScreen = pWindow->drawable.pScreen; + + if (pPixmap == (*pScreen->GetScreenPixmap) (pScreen)) + pPixmap = NULL; setCwPixmap (pWindow, pPixmap); }