GNOME Bugzilla – Bug 661358
Shell notifications should not steal the focus
Last modified: 2011-11-09 21:29:19 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.
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.
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.
Amended the summary before pushing. Thanks for the review.
*** Bug 662817 has been marked as a duplicate of this bug. ***