On Sun, Feb 22, 2009 at 11:04 AM, Havoc Pennington <havoc.penning...@gmail.com> wrote: > Quickly googling, here's a random old mail that explains it: > http://mail.gnome.org/archives/desktop-devel-list/2004-August/msg00158.html > > The purpose is to "do what people mean" when deciding whether to focus > new windows. > > Havoc >
I understand the idea of not stealing focus from an active window, but I don't see why asking every application to update a timestamp for every input event is a good approach. It seems functional, but quick-and-dirty. Is there a purpose to keeping the timestamp value for all windows, or is it only used to check the last input on the currently focused window? It makes a difference, because it seems to me that we just need to know about the last input event, and not a timestamp for every window. If tracking input events are important, can't the window manager monitor all input events on all windows, and keep track of the last one? This would have a similar overhead, and put the work load on the window manager, which IMHO makes more sense than mandating timestamp tracking by all client windows. Or, there could be a WM_PROTOCOL message that asks the active window "when was your last input event?", so the extra message overhead is small. I compared a simple xterm versus gnome-terminal while holding the backspace key. The CPU time for xterm and X summed to about 1%. The same thing for gnome-terminal gave a total of 4% CPU for the terminal and X. I don't know how much of that is due to XChangeProperty and the resulting notify events, but 4% CPU for a terminal+X to do essentially nothing is a lot. Also, the timestamp doesn't prevent mis-entering input into a newly popped-up window. A few times, I was reading what I typed, then went to press enter, only to see it get eaten by some unknown pop-up, leaving me wondering what I just said OK to. There should probably be a short delay before accepting input on any new pop-up, whenever the current window accepts input. Joe Krahn _______________________________________________ wm-spec-list mailing list wm-spec-list@gnome.org http://mail.gnome.org/mailman/listinfo/wm-spec-list