summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanno Böck <hanno@gentoo.org>2006-11-29 23:20:52 +0000
committerHanno Böck <hanno@gentoo.org>2006-11-29 23:20:52 +0000
commite67dad03f7ba40926c9a6bfd66ec8b17f6b2149b (patch)
tree2944f14c70b4cd3420d5ac993b1f705ea53408c3 /x11-wm/compiz/files
parentBump patchset to push out a patch for the possible security issue in libreal. (diff)
downloadgentoo-2-e67dad03f7ba40926c9a6bfd66ec8b17f6b2149b.tar.gz
gentoo-2-e67dad03f7ba40926c9a6bfd66ec8b17f6b2149b.tar.bz2
gentoo-2-e67dad03f7ba40926c9a6bfd66ec8b17f6b2149b.zip
add generic start script to compiz (could replace compiz-xgl/aiglx/nvidia if it works well)
(Portage version: 2.1.2_rc2-r3)
Diffstat (limited to 'x11-wm/compiz/files')
-rwxr-xr-xx11-wm/compiz/files/compiz-start30
1 files changed, 30 insertions, 0 deletions
diff --git a/x11-wm/compiz/files/compiz-start b/x11-wm/compiz/files/compiz-start
new file mode 100755
index 000000000000..70373de76aee
--- /dev/null
+++ b/x11-wm/compiz/files/compiz-start
@@ -0,0 +1,30 @@
+# compiz-start script
+#
+# hacky autodetection of neccessary options for XGL/AIGLX/NVIDIA
+#
+# Hanno Boeck, http://www.hboeck.de/
+#
+# Licensed under the same conditions as compiz itself (MIT or GPL)
+
+GLX_WITH_DIRECT=`glxinfo|grep -c GLX_EXT_texture_from_pixmap`
+GLX_WITH_INDIRECT=`LIBGL_ALWAYS_INDIRECT=1 glxinfo|grep -c GLX_EXT_texture_from_pixmap`
+GLX_RENDER=`glxinfo|grep -c "OpenGL renderer string: Mesa GLX Indirect"`
+
+
+COMPIZ_OPTIONS="--replace --use-cow"
+
+if [ $GLX_WITH_DIRECT -eq 3 ]; then
+ if [ $GLX_RENDER -eq 0 ]; then
+ echo NVIDA detected
+ export __GL_YIELD="NOTHING"
+ else
+ echo XGL detected
+ fi
+elif [ $GLX_WITH_INDIRECT -eq 3 ]; then
+ echo AIGLX detected
+ export LIBGL_ALWAYS_INDIRECT=1
+ COMPIZ_OPTIONS="$COMPIZ_OPTIONS --strict-binding"
+fi
+
+gtk-window-decorator --replace &
+compiz $COMPIZ_OPTIONS gconf move resize minimize place decoration wobbly fade cube rotate scale switcher zoom dbus