Package: compiz-core
Version: 0.2.0-1
Severity: wishlist
Tags: patch

Please add something similar to the attached patch to the compiz wrapper script
so that Xgl can be used, since this solution is currently more stable for users
of nVidia graphics cards.

Thank you
-- 
Adonikam Virgo

--- compiz-0.2.0.orig/debian/compiz.wrapper     2006-10-16 16:42:10.000000000 
+0100
+++ compiz-0.2.0/debian/compiz.wrapper  2006-10-16 16:25:27.000000000 +0100
@@ -2,6 +2,7 @@
 
 COMPIZ_OPTIONS="--strict-binding --use-cow"
 COMPIZ_PLUGINS=""
+COMPIZ_LD_PRELOAD=""
 
 # if the GLX implementation is not by NVIDIA, use indirect rendering
 /usr/bin/glxinfo | grep "client glx vendor string: NVIDIA Corporation" > 
/dev/null 2>&1
@@ -19,6 +20,14 @@
        COMPIZ_PLUGINS="$COMPIZ_PLUGINS gconf"
 fi
 
-# always load the gconf plugin
-/usr/bin/compiz.real $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS
+# use mesa library if Xgl is running
+if ps -C Xgl > /dev/null; then
+       if [ -f /usr/lib/nvidia/libGL.so.1.2.xlibmesa ]; then
+               COMPIZ_LD_PRELOAD="/usr/lib/nvidia/libGL.so.1.2.xlibmesa"
+       elif [ -f /usr/lib/fglrx/libGL.so.1.2.xlibmesa ]; then
+               COMPIZ_LD_PRELOAD="/usr/lib/fglrx/libGL.so.1.2.xlibmesa"
+       fi
+fi
 
+# always load the gconf plugin
+LD_PRELOAD=$COMPIZ_LD_PRELOAD /usr/bin/compiz.real $COMPIZ_OPTIONS "$@" 
$COMPIZ_PLUGINS

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to