compiz/compiz-gtk

33 lines
762 B
Plaintext
Raw Normal View History

#!/bin/bash
2008-12-04 20:59:54 +00:00
function runCompiz() {
2008-12-04 20:59:54 +00:00
gtk-window-decorator &
if ( [ -e /usr/lib/compizconfig/backends/libgconf.so ] || [ -e /usr/lib64/compizconfig/backends/libgconf.so ] )
then
exec compiz --ignore-desktop-hints ccp $@
else
exec compiz --ignore-desktop-hints glib gconf gnomecompat $@
fi
}
ISSW=`glxinfo | grep "Software Rasterizer" -c`
2009-08-07 12:45:24 +00:00
# Try with direct rendering
HAVETFP=`glxinfo | grep texture_from_pixmap -c`
2009-08-22 14:42:23 +00:00
if ( [ $ISSW == 0 ] && [ $HAVETFP -gt 2 ] ); then
2009-08-07 12:45:24 +00:00
runCompiz $@
fi
# Try again with indirect rendering
export LIBGL_ALWAYS_INDIRECT=1
HAVETFP=`glxinfo | grep texture_from_pixmap -c`
2009-08-22 14:42:23 +00:00
if ( [ $ISSW == 0 ] && [ $HAVETFP -gt 2 ] ); then
2009-03-16 14:05:01 +00:00
runCompiz $@
2008-12-04 20:59:54 +00:00
fi
# Fall back to metacity
exec metacity $@