2008-05-06 01:22:50 +02:00
|
|
|
diff -aurp gnome-session-2.22.1.1/gnome-session/gnome-wm gnome-session-2.22.1.1-patched/gnome-session/gnome-wm
|
2008-07-25 00:53:09 +02:00
|
|
|
--- 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
|
2008-05-13 12:41:24 +02:00
|
|
|
@@ -39,22 +39,33 @@ done
|
2008-05-06 01:22:50 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2008-05-13 12:41:24 +02:00
|
|
|
- xdpyinfo 2> /dev/null | grep -q "^ *Composite$" 2> /dev/null
|
|
|
|
- IS_X_COMPOSITED=$?
|
2008-05-06 01:22:50 +02:00
|
|
|
+ if [ "x$XDG_CONFIG_HOME" = "x" ]; then
|
2008-05-13 12:41:24 +02:00
|
|
|
+ COMPIZ_ENABLED_FILE="$HOME/.config/compiz/enable-compiz"
|
2008-05-06 01:22:50 +02:00
|
|
|
+ else
|
2008-05-13 12:41:24 +02:00
|
|
|
+ COMPIZ_ENABLED_FILE="$XDG_CONFIG_HOME/compiz/enable-compiz"
|
2008-05-06 01:22:50 +02:00
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
+ KNOWN_WM="metacity sawfish sawmill enlightenment icewm wmaker fvwm2 qvwm fvwm twm kwm"
|
2008-05-13 12:41:24 +02:00
|
|
|
|
|
|
|
- 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
|
2008-05-06 01:22:50 +02:00
|
|
|
+ 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
|
2008-05-13 12:41:24 +02:00
|
|
|
@@ -65,6 +76,7 @@ if [ -z "$WINDOW_MANAGER" ] ; then
|
2008-05-06 01:22:50 +02:00
|
|
|
done
|
|
|
|
IFS=$OLDIFS
|
|
|
|
done
|
|
|
|
+
|
|
|
|
else
|
|
|
|
WINDOW_MANAGER=$DEFWM
|
|
|
|
fi
|
2008-05-13 12:41:24 +02:00
|
|
|
@@ -104,11 +116,7 @@ if [ ! -z "$SMID" ] ; then
|
2008-05-06 01:22:50 +02:00
|
|
|
OPT1=-i
|
|
|
|
OPT2=$SMID
|
|
|
|
;;
|
|
|
|
- compiz)
|
|
|
|
- OPT1=--sm-client-id
|
|
|
|
- OPT2=$SMID
|
|
|
|
- ;;
|
|
|
|
- beryl)
|
|
|
|
+ compiz-manager)
|
|
|
|
OPT1=--sm-client-id
|
|
|
|
OPT2=$SMID
|
|
|
|
;;
|
2008-05-13 12:41:24 +02:00
|
|
|
@@ -116,18 +124,6 @@ if [ ! -z "$SMID" ] ; then
|
2008-05-06 01:22:50 +02:00
|
|
|
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!"
|