summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJigish Gohil <cyberorg@prime.cyberorg.info>2008-03-12 21:38:52 +0530
committerJigish Gohil <cyberorg@prime.cyberorg.info>2008-03-12 21:38:52 +0530
commit8b7ffb9e80121096b1fe326dbe2e674dabbc5d85 (patch)
tree5da461d15dda3b3a871b92a0fec53ddf7666b945
parenta1367fd78e9e0069b41740d7e0f9e25dcde9bff9 (diff)
downloadmisc-8b7ffb9e80121096b1fe326dbe2e674dabbc5d85.tar.gz
misc-8b7ffb9e80121096b1fe326dbe2e674dabbc5d85.tar.bz2
add dry run, kde4 decorator
-rw-r--r--compiz-manager36
1 files changed, 23 insertions, 13 deletions
diff --git a/compiz-manager b/compiz-manager
index 21d7e91..ad733e0 100644
--- a/compiz-manager
+++ b/compiz-manager
@@ -110,6 +110,11 @@ abort_with_fallback_wm()
return 0;
fi
+ if [ "x$CM_DRY" = "xyes" ]; then
+ verbose "Dry run failed: Problems detected with 3D support.'n"
+ exit 1;
+ fi
+
verbose "aborting and using fallback: $FALLBACKWM \n"
if [ -x $FALLBACKWM ]; then
@@ -138,7 +143,7 @@ check_npot_texture()
check_fbconfig()
{
verbose "Checking for FBConfig: "
- if [ "$INDIRECT" = "yes" ]; then
+ if [ "x$INDIRECT" = "xyes" ]; then
$GLXINFO -i | grep -q GLX.*fbconfig
FB=$?
else
@@ -269,11 +274,11 @@ running_under_whitelisted_driver()
if egrep -q "Loading .*${DRV}_drv\.so" $LOG &&
! egrep -q "Unloading .*${DRV}_drv\.so" $LOG;
then
- if [ x"$DRV" = x"nvidia" -o x"$DRV" = x"fglrx" ]; then
- COMPIZ_OPTIONS="--no-libgl-fallback --ignore-desktop-hints --replace"
- LIBGL_ALWAYS_INDIRECT=1
- LD_LIBRARY_PATH=/usr/X11R6/lib
- fi
+# if [ x"$DRV" = x"nvidia" -o x"$DRV" = x"fglrx" ]; then
+# COMPIZ_OPTIONS="--no-libgl-fallback --ignore-desktop-hints --replace"
+# LIBGL_ALWAYS_INDIRECT=1
+# LD_LIBRARY_PATH=/usr/X11R6/lib
+# fi
return 0
fi
done
@@ -324,11 +329,13 @@ build_env()
build_args()
{
- if [ $INDIRECT = "yes" ]; then
+ if [ "x$INDIRECT" = "xyes" ]; then
COMPIZ_OPTIONS="$COMPIZ_OPTIONS --indirect-rendering "
fi
if check_nvidia; then
- COMPIZ_OPTIONS="$COMPIZ_OPTIONS --loose-binding"
+ if [ "x$INDIRECT" != "xyes" ]; then
+ COMPIZ_OPTIONS="$COMPIZ_OPTIONS --loose-binding"
+ fi
fi
}
@@ -389,6 +396,11 @@ fi
build_env
build_args
+if [ "x$CM_DRY" = "xyes" ]; then
+ verbose "Dry run finished: everything should work with regards to Compiz and 3D.\n"
+ exit 0;
+fi
+
if [ -f $HOME/.config/compiz/disable-compiz ]; then
abort_with_fallback_wm
fi
@@ -405,15 +417,13 @@ elif [ -x ${COMPIZ_BIN_PATH}kde-window-decorator ] && [ -n "$KDE_FULL_SESSION" ]
verbose "Starting kde-window-decorator\n"
pgrep kde-window-decorator || ${COMPIZ_BIN_PATH}kde-window-decorator --replace &
FALLBACKWM="${KWIN}"
+elif [ -x ${COMPIZ_BIN_PATH}kde4-window-decorator ] && [ x$KDE_SESSION_VERSION = x"4" ]; then
+ pgrep kde4-window-decorator || ${COMPIZ_BIN_PATH}kde4-window-decorator --replace &
fi
if [ x$FUSION_ICON = "x/usr/bin/fusion-icon" ] ; then
pgrep fusion-icon || ${FUSION_ICON} -n &
fi
-if [ -z "$SMID" ]; then
- ${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS --sm-disable "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS
-else
- ${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS --sm-client-id $SMID "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS
-fi
+${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS