[Xmonad] getting rid of CrossingEvent

Spencer Janssen sjanssen at cse.unl.edu
Mon Aug 20 17:25:11 EDT 2007

On Saturday 18 August 2007 08:50:48 Andrea Rossato wrote:
> Hi,
> I don't know if these patches ere going to be accepted, anyway this is
> my proposal: XMonad should not respond to CrossingEvent(s). That is to
> say, it should be the layout to decide whether entering a window with
> the pointer makes that window focused.
> The present behavior is incompatible with Tabbed (it forces a redraw
> of tabs every time the pointer enters a window). Moreover I don't like
> very much the fact that a keyboard driven WM gives such a power to the
> mice.
> It is possible to adopt a different approach, with the second patch
> attached: a layout modifier that makes a layout respond to
> CrossingEvent(s) by giving focus to the entered window.
> Unfortunately this second patch is incompatible with Tabbed too (well
> I'm not going to use it with Tabbed, obviously...;-), and in general
> with layouts that add hooks to modifyLayout the way Tabbed (via
> Decoration) does.
> This is a more general issue we should take care of: there's probably
> the need to add hooks to respond to different X Events, like
> Decoration.hs, without messing up with other hooks.
> I need it for my remote controlling stuff. But I'm not the only one.
> Indeed the same problem can be seen with SwitchTrans.hs (Lukas decided
> not to let David do the nice stuff he does with modifyLayout ...;-).
> This is also the reason why XMonadContrib.LayoutHelpers.idModMod is
> not a real identity, like erasing something is not anything anymore.
> We are hitting this problem frequently...
> Andrea

We might look at making focus layout dependent later on, but I think
David's "don't refresh when setting focus to already focussed window."
patch is good enough for now.

Spencer Janssen

More information about the Xmonad mailing list