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

Klaus Weidner kweidner at pobox.com
Sat May 17 15:13:00 EDT 2008

On Sat, May 17, 2008 at 01:38:48PM -0500, Spencer Janssen wrote:
> 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.

So would the right thing be to do a combination of both? Keep the current
mouseFocused logic in Operations.hs to discard crossing events if the
user wasn't moving the mouse, and add the check in Main.hs to skip the
focusing on Enter events if the pointer isn't in the window being entered


More information about the xmonad mailing list