← 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”

 

OK, I didn't express myself clearly here:

>>> 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.
>
> That's assuming the question. Whether you "deliberately focus another
> window" is what the window manager is trying to guess.

Let's say windows A and B are already open, and A is focused. Window A
is a panel, dock or app-launcher of some sort. Window A spawns a new
window, C, which takes 30 seconds to open. Window A, upon spawning the
new window, would immediately throw focus to something defined as
«nothing». If, after those 30 seconds, focus is with «nothing», then
window C should assume focus when it opens. The user can move focus
away from «nothing» to a window by clicking
(or mousing-over) it as now.
>>> 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.
>
> So how do you define "started doing something else"?

When focus passes to any window.

>>> 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.
>
> In the OpenOffice.org case, that would mean the previously focused
> window would remain focused for about 30 seconds after you launched
> OpenOffice.org, *then* become unfocused as soon as OO.o became able to
> do anything.

By “the launching app” here, I meant the panel/dock. In this case, the
previously-focused window (called A above) relinquishes focus
immediately when OOo is launched/spawned (e.g. the icon clicked). For
30 seconds, «nothing» is focused. When the OOo window (C) finally gets
round to opening, «nothing» is still focused, so OOo assumes focus.

Alternatively, if during those 30 seconds I click on and thus focus
window B, a window is focused and so OOo appears in the background.
When a new window opens, it should assume focus if and only if
«nothing» is focused.



References