From 1dfa85d97ac704d8b81d96ce0b20c0ce34de51cf Mon Sep 17 00:00:00 2001 From: David Reveman Date: Thu, 22 Jan 2009 11:40:31 -0500 Subject: Add Composite extension check. --- hw/dmx/dmxextension.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3