
Hi there! I have looked a little bit into enabling XMonad to replace an existing window manager when starting. I think it's a useful feature to help a new user to try out the window manager (e.g. from a running Gnome-Session with Metacity). I also found a corresponding 'issue' on the bug tracker (http://code.google.com/p/xmonad/issues/detail?id=99), which however has been closed as 'WontFix'. I have a rough version of the feature ready, which is good enough for my needs for now. It's not in a shape to go into the repository though, I'm only posting this here in case someone wants to continue working on it and for reference. The current version of the patch is attached. It's also available at my repository (http://tuvok.home.dyndns.org/xmonad-dev/xmonad/). I had a look at http://tronche.com/gui/x/icccm/sec-2.html#s-2.8 for reference, but mostly followed the code of other window managers. Namely XFWM4, Compiz and Metacity. If someone wants to look into it, here are the relevant parts: apt-get source xfwm4 -> edit screen.c -> search for myScreenSetWMAtom apt-get source compiz -> edit display.c -> search for replaceCurrentWm apt-get source metacity -> core/screen.c -> search for replace_current_wm My code does not everything these window managers do for this feature. The steps that I have skipped out of laziness and/or limited understanding of X11 programming, are marked with 'SKIPPED' in the code. Basically my code right now always replaces an existing window manager and assumes that everything goes fine. One other thing I noticed: While XMonad can now replace other window managers, it doesn't allow itself to be replaced in this manner. I haven't looked into it further, but we would need to play nice and terminate when we see another WM trying to take over. Things to do: - implement 'SKIPPED' parts - add '--replace' flag and only replace when the user specifies this flag - allow replacement of XMonad by another WM As I said, I have paused working on this feature for now. If anyone wants to have a shot at it, feel free to do so! :-) Cheers! Jan