[xmonad] Move EWMH support initialization to a startupHook

Spencer Janssen spencerjanssen at gmail.com
Thu Oct 22 22:54:46 EDT 2009


On Thu, Oct 22, 2009 at 08:06:21PM -0400, Adam Vogt wrote:
> * On Thursday, October 22 2009, Daniel Schoepe wrote:
> [...]
> 
> >I think that the benefits of this patch outweigh the breakage since
> >the current behavior is somewhat broken in my opinion.
> >
> >Applied, thanks!
> 
> I would like to avoid config breakage, even if it is only for
> darcs-users (since the ewmhdesktops changed from a layout to event hook
> from 0.8).
> 
> We can accomplish the same thing by making a top-level, non-exported
> IORef Bool (as is already done in other modules such as UrgencyHook),
> and then checking that one if we need to set the X atoms.
> 
> Once Daniel's extensible state patch gets applied in core, it will be
> simple to replace the IORef with the use of that feature.
> 
> Attached is a patch that makes these changes. I think it should be
> applied before the 0.9 freeze, but I'm not going to do that because
> there were some objections in #xmonad such as:
> 
>   - IORefs are evil
>   - it only applies to darcs version users, and these are supposed to
>     handle these things
> 
> --
> Adam

Top level IORefs are evil, but sometimes they're the path of least resistance.
The arguments against top level state have been repeated many times, so let's
put that aside for now.

I think that the current state of EWMH is how things ought to be, a clear
separation between initialization steps and steps that are repeated on each
layout.


Cheers,
Spencer Janssen


More information about the xmonad mailing list