#706149 xmonad: Fails to start if there's fewer workspaces than monitors

Package:
xmonad
Source:
xmonad
Description:
Lightweight X11 window manager written in Haskell
Submitter:
Lars Wirzenius
Date:
2014-12-28 20:45:15 UTC
Severity:
normal
#706149#5
Date:
2013-04-25 13:12:17 UTC
From:
To:
My xmonad configuration only sets up a single workspace: I create the
rest dynamically as I need them. I use a laptop, and sometimes have an
external monitor. If I have a single workspace when I attach the second
monitor, xmonad fails to start.

A minimal .xmonad.hs that exhibits the problem:
--- 8< ---
import XMonad
import XMonad.Config.Gnome

main :: IO ()
main = do xmonad $ gnomeConfig { workspaces = ["GTD"] }
--- 8< ---

Procedure for reproducing:

* Use the above .xmonad.hs.
* Log into a GNOME+Xmonad session in wheezy.
* If there are two monitors, xmonad fails to start.
* If there is a single monitor, this works. If I attach a second monitor,
  xmonad does not crash. However, re-starting it (e.g., due to a
  change to .xmonad.hs) doesn't work.

The error message xmonad gives when starting up:

xmonad-x86_64-linux: xmonad: StackSet: non-positive argument to StackSet.new

I am probably unsual in liking to create my workspaces dynamically on
demand. However, it would be good if xmonad would at least start even
if it can't have something on every monitor.