[compiz] Small questions about recent CVS commit

Mike Hearn mike at plan99.net
Thu Apr 13 05:30:55 PDT 2006


Dan Winship wrote:
> The app can't avoid stealing focus without help from the windowmanager.

Yes, sure, respecting USER_TIME being zero is good stuff.

> And there are no heuristics. The problem you're complaining about is
> metacity's fallback behavior: if an app doesn't participate in the
> focus-stealing prevention game, then metacity just always denies it
> focus.

Well, I was meaning the way it tracks clicks, timestamps and so on ... 
if a click somewhere opens up a window in a new process like Gimp 
plugins do then you need to propogate timestamps and so on. If the app 
doesn't then things start going wrong (eg windows appearing underneath 
others).

For instance, I did some Wine/GTK integration a few months ago, and this 
caused total nightmares ... the GTK+ filepicker and other windows would 
not just appear unfocussed but would appear below everything else as 
well. I tried making Wine do the whole mouse click/timestamp thing and 
eventually just gave up. It would have been easier to strip the hint 
from the GTK+ windows before they were mapped and take it out of the 
scheme entirely, but I didn't know that would work at the time.

  I will probably make the default behavior in compiz be the
> opposite, as you sort of suggest. (If the app doesn't set
> _NET_WM_USER_TIME to anything, then it will always steal focus.) 

The problem is that GTK+ sets it implicitly. Which is why things like 
the Gimp break.

> At any rate, the focus-stealing-prevention
> behavior will presumably be as ridiculously overconfigurable as
> everything else in compiz, so don't worry about it.

Heh, yay :)

thanks -mike


More information about the compiz mailing list