--- ./hw/xfree86/xaa/xaaInit.c.offscreen-pixmaps 2006-07-05 14:31:42.000000000 -0400 +++ ./hw/xfree86/xaa/xaaInit.c 2006-08-07 18:44:21.000000000 -0400 @@ -98,6 +98,34 @@ xfree(infoRec); } +static void +SelectionChangedCallback (CallbackListPtr *list, + pointer xaaData, pointer callData) +{ + static Atom atom = BAD_RESOURCE; + static char atom_name[] = "_COMPIZ_GL_INCLUDE_INFERIORS"; + + SelectionInfoPtr info = call_data; + XAAInfoRecPtr infoRec = xaa_data; + + if (atom == BAD_RESOURCE) + { + atom = MakeAtom(atom_name, strlen(atom_name), True); + if (atom == BAD_RESOURCE) + return; + } + + if (info->selection->selection == atom && + info->kind == SelectionSetOwner && + info->selection->window != None) + { + infoRec->offscreenDepths = 0; + infoRec->Flags &= ~OFFSCREEN_PIXMAPS; + + XAAMoveOutOffscreenPixmaps(pScreen); + XAAInvalidatePixmapCache(pScreen); + } +} Bool XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) @@ -228,11 +256,11 @@ if(infoRec->Flags & MICROSOFT_ZERO_LINE_BIAS) miSetZeroLineBias(pScreen, OCTANT1 | OCTANT2 | OCTANT3 | OCTANT4); + AddCallback(&SelectionCallback, SelectionChangedCallback, infoRec); + return TRUE; } - - static Bool XAACloseScreen (int i, ScreenPtr pScreen) { @@ -264,6 +292,8 @@ xfree ((pointer) pScreenPriv); + DeleteCallback(&SelectionCallback, SelectionChangedCallback, infoRec); + return (*pScreen->CloseScreen) (i, pScreen); }