After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661358 - Shell notifications should not steal the focus
Shell notifications should not steal the focus
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
3.2.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 662817 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-10-10 08:31 UTC by Aurélien Naldi
Modified: 2011-11-09 21:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
messageTray: don't steal focus when poping under the pointer (1.34 KB, patch)
2011-11-02 23:51 UTC, Rui Matos
committed Details | Review

Description Aurélien Naldi 2011-10-10 08:31:13 UTC
What works well:
I am typing code/secret-plan-to-conquer-the-world into my favorite text editor.
A friend says hello on jabber, gnome-shell gets the telepathy event and shows a cute notification, it hides some part of the screen but as it uses transparency I can still somehow see it. I continue typing into the text editor and after a while the notifications disappears. When I have finished what I was doing, I go to the message tray, find the IM icon and answers the message.


What doesn't work so well:
Imagine the same story, but before getting the message, I moved the mouse pointer to the bottom part of the screen. I am not touching the mouse at all, just typing but when the notifications shows up, it appears under the mouse pointer, thus it believes I want to know more about it, grows to show the IM bubble and when I continue typing the text is entered as answer. Then I have to delete it, move it back into the right window, make some effort to finish what I was doing, when I get back to my friend, he thought I was answering for 5 minutes and I am pissed off at him for interrupting!


What should happen:
Notifications bubble should not steal focus unless we are fairly sure it is what the user wants.
If a notifications shows up under the mouse pointer, it should not steal focus, and IMHO it should not receive mouse clicks either. If the user want to interact with it, he should move the mouse out of it and come back.
Comment 1 Rui Matos 2011-11-02 23:51:17 UTC
Created attachment 200558 [details] [review]
messageTray: don't steal focus when poping under the pointer

We must look for the actor under the pointer in the whole message tray and not
just in the notification. This will avoid us to capture focus when a
notification comes up with the pointer on the whole tray area.
Comment 2 Marina Zhurakhinskaya 2011-11-03 17:17:30 UTC
Review of attachment 200558 [details] [review]:

s/poping/popping :)

This works well! Strangely, this._notificationBin.contains(actorAtShowNotificationPosition) doesn't return true even if the pointer is over the notification, so it doesn't work at all, though it worked when it was implemented. Checking this.actor.contains(actorAtShowNotificationPosition) is better anyway because, as you pointed out, we should not expand the notification if the pointer is anywhere in the tray area.
Comment 3 Rui Matos 2011-11-04 01:43:31 UTC
Amended the summary before pushing. Thanks for the review.
Comment 4 Rui Matos 2011-11-09 21:29:19 UTC
*** Bug 662817 has been marked as a duplicate of this bug. ***