xorg-x11-server/xorg-x11-server-1.1.1-offscreen-pixmaps.patch
2006-08-08 18:17:36 +00:00

73 lines
1.7 KiB
Diff

--- xorg-server-1.1.1/hw/xfree86/xaa/xaaInit.c.offscreen-pixmaps 2006-07-05 14:31:42.000000000 -0400
+++ xorg-server-1.1.1/hw/xfree86/xaa/xaaInit.c 2006-08-08 14:02:05.000000000 -0400
@@ -4,6 +4,7 @@
#include <xorg-config.h>
#endif
+#include <string.h>
#include "misc.h"
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -20,6 +21,7 @@
#include "xaawrap.h"
#include "xf86fbman.h"
#include "servermd.h"
+#include "selection.h"
#define MAX_PREALLOC_MEM 65536 /* MUST be >= 1024 */
@@ -98,6 +100,29 @@
xfree(infoRec);
}
+static void
+SelectionChangedCallback (CallbackListPtr *list,
+ pointer xaaData, pointer callData)
+{
+ static char atom_name[] = "_COMPIZ_GL_INCLUDE_INFERIORS";
+
+ SelectionInfoRec *info = callData;
+ XAAInfoRecPtr infoRec = xaaData;
+ ScreenPtr pScreen = infoRec->pScrn->pScreen;
+ Atom atom;
+
+ atom = MakeAtom(atom_name, strlen(atom_name), 0);
+ 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 +253,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 +289,9 @@
xfree ((pointer) pScreenPriv);
+ DeleteCallback(&SelectionCallback, SelectionChangedCallback,
+ pScreenPriv->AccelInfoRec);
+
return (*pScreen->CloseScreen) (i, pScreen);
}