I don't think "stealing" focus is right at all. Windows shouldn't
"steal" focus. Rather, they get "given" focus.

This is an important point. It means that a parent window can focus
it's child, rather than the child asserting it's right to focus.  A
new window opened by the currently focussed window will be given focus
by the parent window. A new window created by a window which doesn't
have focus, _won't_ be given focus.

IMO, focussing is the job of the window manager, error messages should
be modal for their window, and no window should popup unless the user
or the currently focussed window asks it to.

But since Mozilla seems to want to implement everything all by itself,
it would then need to be able to track z-order of all open windows.
Clicking a window should bring it to the top, and any window-modal
dialogs would be on top of that. A window which requests itself to
focus will no-op. A window that asks that another be given focus, will
only give _its_ focus. The window being given focus appears above
window giving focus, and _no other_. This would comply with the
JavaScript spec, as technically any window which can find another (by
name or by parent-child association) should be able to give it focus.
Plus, the user wont get annoyed with windows popping up all over the
shop.

For more details, see my comment on bug 88810.

Randall, I would happily have a dig at it. Point me to the right file
and I'll hack till I drop.

BTW, I don't think newsgroup posts (or worse, email) are such a good
idea for discussing things like this, as they will inevitably be lost
in the mists of cyberspace by the time the code comes up for review or
the bug crops up in another guise later on.

Which is easier, 
a) reading a long bugzilla page,
or b) trawling through a million newsgroup postings about communist
imagery in the mozilla banners
to find important discussions like this?

Which is why I am posting this message to both this NG, and bug 88810.

Reply via email to