[xmonad] darcs patch: quick hack to avoid infinite (but breakable) loop when...

Spencer Janssen sjanssen at cse.unl.edu
Sat May 17 14:38:48 EDT 2008

On Sat, May 17, 2008 at 05:09:41AM -0700, David Roundy wrote:
> On Sat, May 17, 2008 at 03:12:49AM -0700, Klaus Weidner wrote:
> > Probably the right thing to do would be to clear the pending crossing
> > events in 'windows' whenever the layout manipulation moves/resizes/remaps
> > windows, and not clear it if only the focus has changed. What would be
> > a clean way to make that distinction?
> Probably a better option would be to not clear crossing events at all, but
> instead when we handle crossing events to first check if the mouse is still
> in the said window.  If it's not, then we should ignore the event.

This misses the entire reason why we clear window entry events in the first
place.  When the current layout changes (or when switching workspaces) a window
entry event will be generated for the window under the cursor even if the mouse
is entirely stationary.  We don't want to perform focus changes based on the
position of the mouse if the user isn't even moving it.

Spencer Janssen

More information about the xmonad mailing list