#!/bin/sh

# This is an Xsession wrapper for use with wdm to take care of the
# handling of the 'NoChange' window manager selection option.

if [ $# -eq 1 ] ; then
  echo $1 > $HOME/.wm_style
  shift
fi

# Use $HOME/.wm_style only if available.
if [ -r $HOME/.wm_style ]; then
    WM_STYLE_CONTENTS=`cat $HOME/.wm_style`
    set $WM_STYLE_CONTENTS $@
fi

. /etc/X11/Xsession
