[xmonad] darcs patch: Support for better X event hooking

Spencer Janssen spencerjanssen at gmail.com
Mon Feb 2 16:27:19 EST 2009

On Sun, Jan 11, 2009 at 08:17:12PM +0100, Daniel Schoepe wrote:
> This patch adds the capability to hook on X event processing in the
> configuration, but, unlike the EventHook module from contrib(Which
> implements this via a layout modifier and thus doesn't get notified
> about events already handled by xmonad), works for all events that
> xmonad receives. The custom handler function can choose on whether or
> not to call the default handler for the message afterwards.
> Since already handled messages are not broadcasted to the layout or
> anywhere else this functionality cannot be implemented as a contrib
> module and hence requires core changes.
> Such a feature would be useful for things that need more fine grained
> control over the default event handling. One usage case would be to
> react on changing window properties like the title, e.g. to manage
> windows that set their title after creation.

One thing that this patch doesn't really address is what it means to combine
event hooks.  As we use this functionality in contrib, we'll come upon the
inevitable situation where a user wants to use two event hooks.  We need to
at least document the correct method, and probably provide an operator to do
it.  Perhaps Monoid could be used?

As a minor issue, I'd rather keep the name XMonad.Main.handle instead of

Spencer Janssen

More information about the xmonad mailing list