focus stealing prevention

Brian J. Tarricone bjt23 at cornell.edu
Thu Feb 23 08:19:36 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Olivier Fourdan wrote:
> 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.

Yeah, I know.  I'll be the first one to get annoyed at people who don't
implement the spec properly, and cause apps that depend on the spec to
function improperly.

BUT, I'd much rather functional focus-stealing prevention.

Having said that, the offending apps that I see are the panel and
xfdesktop, when I'm clicking apps in the desktop menu.  The annoying
thing is that it's not reproducible all the time.

Heh, though I just tried it.  Right click on deskop, select Desktop
Settings.  My RAM is mostly full, so it took a few seconds, and then the
window popped up behind this mail window.  I hadn't touched the keyboard
at all since before clicking with the mouse.

Is there something xfdesktop needs to be doing?  I thought gtk was
supposed to set NET_WM_USER_TIME automatically.

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

*nod*

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

I care more that it works the way I expect it, and doesn't frustrate me.
 Which is not really the case right now for probably 35% of the time.
Considering your opinion of metacity as you've voiced in the past, I'd
hardly consider that a good example for support of how xfwm4 behaves ^_~.

Anyway, just a suggestion.  If you can think of a way to make things
behave better with this particular case without having to change xfwm4,
I'm certainly willing to hear you out.

	-brian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD/WIH6XyW6VEeAnsRAgzQAJ9ZCMA5oIQECezO5ERRpcW3UvHYvgCfZtt6
pBrgZN6pzXq9nh4Md+o+mHk=
=AVGX
-----END PGP SIGNATURE-----



More information about the Xfce4-dev mailing list