← Back to team overview

unity-design team mailing list archive

Re: Papercut or not? Bug #495403 in One Hundred Paper Cuts: “Do not raise windows or dialogs without user input”

 

> That is precisely what it does, and has done for years. But it will
> always be guessing. If you're watching a video and it mentions an
> unfamiliar word, and you launch the Dictionary to look it up, and it
> takes two seconds to launch, you want it to take focus. But if you
> launch OpenOffice.org and it takes 40 seconds to launch, probably you
> don't want it to suddenly cover the video you'll be watching 40 seconds
> later. So when should the window manager switch from assuming you want a
> new window focused, to assuming you don't?

When you deliberately focus another window.

> After five seconds? Ten? Twenty?

It shouldn't be timed.

I suggest that if you haven't had time to focus another window (i.e.
if you haven't started doing something else), focus the new window. If
you've focused another window, the new window should open in the
background.

> And how can the window manager, by itself, tell which was the
> action that resulted in the window eventually opening?

The window manager doesn't need to know what launched the window. The
focus state of the new window should only be based on what's focused
when the new window opens. The launching app can then affect the new
window's focus indirectly by throwing focus to «nothing». If «nothing»
remains focused by the time the new window opens, focus the new
window. If something is focused when the new window opens, it keeps
focus.



Follow ups

References