summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2009-01-22 11:40:31 -0500
committerDavid Reveman <davidr@novell.com>2009-01-22 11:40:31 -0500
commit1dfa85d97ac704d8b81d96ce0b20c0ce34de51cf (patch)
tree4427a94ead8b3efeb4b8c832b04dc3b4ad5011ff
parent73a8a1aa6cd6d747d533ca63213f511244820a45 (diff)
Add Composite extension check.
-rw-r--r--hw/dmx/dmxextension.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index c7eecaf7f..7bbdb9dd7 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -1504,7 +1504,7 @@ dmxAttachScreen (int idx,
if (!beShape)
{
dmxLogErrorSet (dmxWarning, errorSet, error, errorName,
- "SHAPE extension missing");
+ "SHAPE extension missing on back-end server");
dmxCloseDisplay (dmxScreen);
/* Restore the old screen */
@@ -1512,6 +1512,31 @@ dmxAttachScreen (int idx,
return 1;
}
+#ifdef COMPOSITE
+ if (!noCompositeExtension)
+ {
+ Bool beComposite = FALSE;
+ int eventBase;
+
+ XLIB_PROLOGUE (dmxScreen);
+ beComposite = XCompositeQueryExtension (dmxScreen->beDisplay,
+ &eventBase,
+ &errorBase);
+ XLIB_EPILOGUE (dmxScreen);
+
+ if (!beComposite)
+ {
+ dmxLogErrorSet (dmxWarning, errorSet, error, errorName,
+ "Composite extension missing on back-end server");
+ dmxCloseDisplay (dmxScreen);
+
+ /* Restore the old screen */
+ *dmxScreen = oldDMXScreen;
+ return 1;
+ }
+ }
+#endif
+
if (!dmxScreen->scrnWin)
dmxScreen->scrnWin = DefaultRootWindow (dmxScreen->beDisplay);