2009-05-28 03:53:01 +02:00
|
|
|
Index: gnome-session-2.26.1/data/gnome-wm
|
|
|
|
===================================================================
|
|
|
|
--- gnome-session-2.26.1.orig/data/gnome-wm
|
|
|
|
+++ gnome-session-2.26.1/data/gnome-wm
|
|
|
|
@@ -51,22 +51,33 @@ if [ "x$WINDOW_MANAGER" = "xgnome-wm" ];
|
|
|
|
WINDOW_MANAGER=""
|
|
|
|
fi
|
2008-05-06 01:22:50 +02:00
|
|
|
|
|
|
|
+# 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"
|
2009-05-28 03:53:01 +02:00
|
|
|
+ if test -f "$COMPIZ_ENABLED_FILE" -a "$COMPIZ_ENABLED_FILE" -nt /etc/X11/xorg.conf; 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
|
2009-05-28 03:53:01 +02:00
|
|
|
@@ -77,6 +88,7 @@ if [ -z "$WINDOW_MANAGER" ] ; then
|
2008-05-06 01:22:50 +02:00
|
|
|
done
|
|
|
|
IFS=$OLDIFS
|
|
|
|
done
|
|
|
|
+
|
|
|
|
else
|
|
|
|
WINDOW_MANAGER=$DEFWM
|
|
|
|
fi
|
2009-05-28 03:53:01 +02:00
|
|
|
@@ -116,11 +128,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
|
|
|
|
;;
|
2009-05-28 03:53:01 +02:00
|
|
|
@@ -128,18 +136,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!"
|