focus stealing prevention

Olivier Fourdan fourdan at xfce.org
Thu Feb 23 07:35:59 CET 2006


Brian J. Tarricone wrote:
> -----BEGIN PGP SIGNED MESSAGE-----

> I have a suggestion to improve the focus stealing prevention in xfwm4.
> I noticed often I'll right click on the panel, and click "add new item",
> and then the new item box will pop up, but unfocused and under other
> windows.  This scenario -- a mouse click triggering a new window that
> then doesn't get focused -- seems to happen often.  I'm not touching the
> keyboard at all between the mouse click and the window getting mapped.
> 
> So my suggestion: track mouse clicks, and if there was no key press
> between the last mouse click and the new window being mapped, give the
> new window the focus (assuming the global "give new windows focus"
> setting is set, of course).  I really feel like this would make the
> focus stealing prevention more useful, and less frustrating.
> 
> What do you think?

I think it's up to the application to update their NET_WM_USER_TIME 
property based on the user activity as documented in the specs, as the 
window manager is not necessarily notified of all keyboard and mouse 
events that occurred in applications windows.

In other words, fixing the apps instead of implementing workarounds in 
the window manager is a better approach I think ;)

BTW, last time I checked, xfwm4 behaves quite correctly, at least in 
line with what other WM (kwin and metacity) do.

Cheers,
Olivier.




More information about the Xfce4-dev mailing list