[Xmonad] darcs patch: Added LayoutMessages

Andrea Rossato mailing_list at istitutocolli.org
Mon Sep 24 12:19:06 EDT 2007

On Mon, Sep 24, 2007 at 08:27:56AM -0700, David Roundy wrote:
> So you've convinced me that two messages would be a Good Thing, but I'd
> vote for a Hide and a ReleaseResources message, with the latter being sent
> if we're going to discard a Layout (possibly because we're going to discard
> a Workspace) or before we exit (in which case it should always be called
> before we show the Layout).
> Note that in any case NonVisible must be treated as a superset of
> LayoutSwitch, since once a LayoutSwitch is received, NonVisible messages
> will *not* be received.  i.e. anything that must be done in response to
> NonVisible must also be done in response to LayoutSwitch.

Well, let me summarize, since I'm quite loosing myself. 

A layout must respond at least to 3 events:
  1. a change in the stack -> UnDoLayout
  2. a change in visibility:
       A. workspace got hidden
       B. LayoutSwitch -> the layout is not reachable anymore
  3. xmonad is going to be restarted.

We need 3 messages: Refresh, Hide, ReleaseResourcses (the third one
for LayoutSwitch/restart). 

Or we could do it with 2 messages (Refresh/Hide) and a method for a
mod-q restart.

Which brings me to another consideration: should we add methods or
messages? They seem to me equal in result.


More information about the Xmonad mailing list