gnome-session/gnome-session-gnome-wm-compiz-manager.patch

86 lines
2.2 KiB
Diff
Raw Normal View History

diff -aurp gnome-session-2.22.1.1/gnome-session/gnome-wm gnome-session-2.22.1.1-patched/gnome-session/gnome-wm
--- gnome-session-2.22.1.1/data/gnome-wm 2008-04-10 16:32:20.000000000 +0200
+++ gnome-session-2.22.1.1-patched/data/gnome-wm 2008-05-13 09:15:37.539788000 +0200
@@ -39,22 +39,33 @@ done
# WINDOW_MANAGER overrides all
+# Migrate compiz to compiz-manager
+if [ "x$WINDOW_MANAGER" = "xcompiz" ]; then
+ WINDOW_MANAGER="compiz-manager"
+fi
+if [ "x$DEFWM" = "xcompiz" ]; then
+ DEFWM="compiz-manager"
+fi
+
if [ -z "$WINDOW_MANAGER" ] ; then
# Create a list of window manager we can handle, trying to only use the
# compositing ones when it makes sense
- xdpyinfo 2> /dev/null | grep -q "^ *Composite$" 2> /dev/null
- IS_X_COMPOSITED=$?
+ if [ "x$XDG_CONFIG_HOME" = "x" ]; then
+ COMPIZ_ENABLED_FILE="$HOME/.config/compiz/enable-compiz"
+ else
+ COMPIZ_ENABLED_FILE="$XDG_CONFIG_HOME/compiz/enable-compiz"
+ fi
+
+ KNOWN_WM="metacity sawfish sawmill enlightenment icewm wmaker fvwm2 qvwm fvwm twm kwm"
- KNOWN_WM="sawfish sawmill enlightenment icewm wmaker fvwm2 qvwm fvwm twm kwm"
- if [ $IS_X_COMPOSITED -eq 0 ] ; then
- KNOWN_WM="compiz beryl $KNOWN_WM"
+ if [ -f "$COMPIZ_ENABLED_FILE" ] ; then
+ KNOWN_WM="compiz-manager $KNOWN_WM"
fi
- # metacity is still the default wm in GNOME
- KNOWN_WM="metacity $KNOWN_WM"
OLDIFS=$IFS
if [ -z "$DEFWM" -o "x$DEFWM" = "xgnome-wm" ]; then
+
for wm in $KNOWN_WM ; do
IFS=":"
for dir in $PATH ; do
@@ -65,6 +76,7 @@ if [ -z "$WINDOW_MANAGER" ] ; then
done
IFS=$OLDIFS
done
+
else
WINDOW_MANAGER=$DEFWM
fi
@@ -104,11 +116,7 @@ if [ ! -z "$SMID" ] ; then
OPT1=-i
OPT2=$SMID
;;
- compiz)
- OPT1=--sm-client-id
- OPT2=$SMID
- ;;
- beryl)
+ compiz-manager)
OPT1=--sm-client-id
OPT2=$SMID
;;
@@ -116,18 +124,6 @@ if [ ! -z "$SMID" ] ; then
esac
fi
-case `basename $WINDOW_MANAGER` in
- compiz)
- export LIBGL_ALWAYS_INDIRECT=1
- gtk-window-decorator &
- OPT3=glib
- OPT4=gconf
- ;;
- beryl)
- emerald &
- ;;
-esac
-
-exec $WINDOW_MANAGER $OPT1 $OPT2 $OPT3 $OPT4
+exec $WINDOW_MANAGER $OPT1 $OPT2
echo "ERROR: No window manager could run!"