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

87 lines
2.2 KiB
Diff
Raw Normal View History

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
+# 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 test -f "$COMPIZ_ENABLED_FILE" -a "$COMPIZ_ENABLED_FILE" -nt /etc/X11/xorg.conf; 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
@@ -77,6 +88,7 @@ if [ -z "$WINDOW_MANAGER" ] ; then
done
IFS=$OLDIFS
done
+
else
WINDOW_MANAGER=$DEFWM
fi
@@ -116,11 +128,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
;;
@@ -128,18 +136,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!"