[xmonad] Issue 200 in xmonad: xmonad spins in a tight loop changing focus back and forth

codesite-noreply at google.com codesite-noreply at google.com
Fri Aug 15 17:44:37 EDT 2008


Issue 200: xmonad spins in a tight loop changing focus back and forth
http://code.google.com/p/xmonad/issues/detail?id=200

Comment #2 by Klaus.Weidner:
Could you try the attached patch? I had sent this previously to the mailing  
list but
it doesn't appear to have been applied. I tried your reproducing steps and  
everything
is behaving as expected.

Do you have the UpdatePointer module active?

Mailing list posting copied below:

[xmonad] patch: fix looping due to unnecessary window crossing events
				
This patch fixes a race condition reported by David Roundy (Subject:
Re: [xmonad] darcs patch: quick hack to avoid infinite (but breakable)
loop when...):

> The isMouseFocused hack introduced a race condition where if you click on  
a
> tab to select a window, and then move the mouse down before the new window
> is selected, the focus will alternate between the previously-focused and
> newly-focused windows in an infinite loop.  This loop can be broken by
> moving the mouse up to the tab area, but it's pretty unpleasant.  This  
race
> condition is easily triggered on my laptop (and presumably on any older
> computer running bloated applications like firefox).

What is happening is apparently:

a) click on tab causes window B to be focused (with mouseFocused true)

b) mouse moves down into old window A, queueing an enter event for A

c) xmonad maps window B, appearing under the mouse pointer

d) enter event for B gets queued

e) xmonad handles enter event for A, causing it to be focused

f) xmonad maps window A, appearing under the mouse pointer

g) enter event for B gets queued

... goto (c)

The change is to ignore crossing events when the pointer is not currently in
the window being reported as entered, for example due to having left it
already, or if the windows were reshuffled due to keyboard commands.

-Klaus

Attachments:
	xmonad-core-ignore-obsolete-crossing-events.dpatch  4.9 KB



-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


More information about the xmonad mailing list