[Xmonad] darcs patch: Define a read-state-only monad for Layouts.

David Roundy droundy at darcs.net
Wed Sep 5 15:28:08 EDT 2007

Hi all,

Here's a proposed change for the Layout API.  I'm not yet
sending updates for XMonadContrib, since I'd rather first
hear what folks think.  The idea is to disallow changes to
the XState in Layout hooks, so we won't run into trouble with
the state changing while we're in the process of updating
said state.  Basically, as far as I can tell, this is needed
in order for the current Layouts API to be safe.

A catch is that some existing Layout code will break.  I
would say that that code is fragile and really wants a
generic hooks API.  As far as I know, the modules that I
maintain will work with this change.  Any Layout that just
lays out windows and does IO stuff will still work (e.g. even
weird ones like WorkspaceDir won't be broken).  But, for
example, Andreas' focus-follows-mouse Layout will break,
since it relies on modifying the XState (to change focus)
within the Layout (which is also why it breaks when combined
with other Layouts).

I look forward to discussion.  In my opinion, we really need
a cleaner Layout API.

(See also my previous email on moving Layouts into the
StackSet, which I still think would be a good idea...)


Wed Sep  5 15:21:15 EDT 2007  David Roundy <droundy at darcs.net>
  * Define a read-state-only monad for Layouts.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 4909 bytes
Desc: A darcs patch for your repository!
Url : http://www.haskell.org/pipermail/xmonad/attachments/20070905/a578b76b/attachment.bin

More information about the Xmonad mailing list