compiz/compiz-gtk

28 lines
560 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 &
2009-08-07 12:45:24 +00:00
exec compiz --ignore-desktop-hints --always-swap glib gconf gnomecompat $@
}
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 $@