[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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

Frederik Nnaji wrote on 21/06/10 16:44:
>
> On Mon, Jun 21, 2010 at 10:00, Matthew Paul Thomas <mpt@xxxxxxxxxxxxx
>...
>> Greg K Nicholson wrote on 29/05/10 02:05:
>>>
>>> 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"?
> 
> Something else is mouse and/or keyboard activity in an other
> application.

So how do you define "activity"?

If the mouse button is actually *down*, or a keyboard key is actually
*pressed*, when a window from another application requests a raise, it
should not be raised. That much is obvious (and seems to be a bug in
current Metacity).

But what if you released the mouse button, or the keyboard key, 0.1
seconds before the other window requests the raise? You're quite likely
to be in the middle of a double-click or of typing a word. So the window
shouldn't be raised then either.

Ok, so what if you released the mouse button, or the keyboard key, 0.5
seconds before the other window requests the raise? The same applies,
just a bit less certainly.

So, we've gone as far as ignoring raise requests 0.5 seconds after the
last release event. But what about one whole second after? Two seconds?
Three? Five? Ten?

>...
>> 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».

So every launcher should be responsible for sending a signal to the
window manager to say "I've just launched something, please unfocus
whatever you had focused"?

How is the launcher supposed to know whether the program it is launching
will open any windows at all?

>...
>> 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.
> 
> yeah, OOo should rather set the hint flag on its window once it
> finishes loading, with a message: "i am ready now". The notification
> system can listen in via dbus or an equally potent IPC method, then
> display a decent notification to the user:
> 
> "OOo is now ready" & [switch-to button]

The window list applet already does this.

- -- 
Matthew Paul Thomas
http://mpt.net.nz/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwfocEACgkQ6PUxNfU6ecqtqQCgoUwtDWK3b/qqPdGbfS2U8eDT
qs8An37DwsfkrnCFSGRoIysBGY7Tz38C
=/rrd
-----END PGP SIGNATURE-----