fix compiz-decorator-gtk
This commit is contained in:
parent
9b6a176157
commit
5780b844f3
|
@ -1,29 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
compiz=`ps ax | grep 'compiz --replace' | grep -v 'grep' | awk '{print $5}'`
|
||||||
|
|
||||||
theme=`gsettings get org.mate.Marco.general theme | cut -d\' -f2`
|
theme=`gsettings get org.mate.Marco.general theme | cut -d\' -f2`
|
||||||
|
|
||||||
echo "$theme"
|
|
||||||
|
|
||||||
function runGTK() {
|
|
||||||
gtk-window-decorator --replace --marco-theme "$theme" $@
|
|
||||||
}
|
|
||||||
|
|
||||||
ISSW=`glxinfo | grep "Software Rasterizer" -c`
|
if [ "$compiz" = "compiz" ] ; then
|
||||||
|
gtk-window-decorator --replace --marco-theme "$theme" &
|
||||||
# Try with direct rendering
|
echo "$compiz with GTK windows-decorator"
|
||||||
HAVETFP=`glxinfo | grep texture_from_pixmap -c`
|
echo "GTK theme is $theme"
|
||||||
|
else
|
||||||
if ( [ $ISSW == 0 ] && [ $HAVETFP -gt 2 ] ); then
|
exit 0
|
||||||
runCompiz $@
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Try again with indirect rendering
|
|
||||||
export LIBGL_ALWAYS_INDIRECT=1
|
|
||||||
|
|
||||||
HAVETFP=`glxinfo | grep texture_from_pixmap -c`
|
|
||||||
|
|
||||||
if ( [ $ISSW == 0 ] && [ $HAVETFP -gt 2 ] ); then
|
|
||||||
runGTK $@
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue