FocusIn on window destruction

Peter Hutterer mailinglists at
Mon Apr 28 21:47:49 PDT 2008

Jeremy Huddleston wrote:
> I've come to the point where I don't want to bang my head trying to  
> untangle spaghetti that someone else probably understands much better  
> and can just point me to the proper function call...  When I close a  
> window, the WM is receiving a FocusIn event for the next window that  
> should gain focus.  Unfortunately for us on OSX, this sometimes causes  
> us to swap Spaces... so I need to add in some logic to handle that  
> case (set focus on the root win if there are no windows in the current  
> space).
> I can't seem to figure out where this FocusIn event is being generated  
> from (or more specifically where the logic is that chooses the "next"  
> window).  Could someone possibly clue me in and help untangle this  
> mess in my head.

Check out the man page for XSetInputFocus, parameter revert_to. Looks 
like this might be the cause.


More information about the xorg mailing list