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 695659 - Various fixes and cleanups for the message tray
Various fixes and cleanups for the message tray
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-11 21:59 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-03-12 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
grabHelper: Use a round trip for focusing the default window (1.05 KB, patch)
2013-03-11 21:59 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Remove a few leftover variables (2.17 KB, patch)
2013-03-11 21:59 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Fix style (978 bytes, patch)
2013-03-11 21:59 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Clean up code a tiny bit (1.46 KB, patch)
2013-03-11 21:59 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Fix idle tracking condition (1.14 KB, patch)
2013-03-11 21:59 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Use the bottom monitor's fullscreen state for rate limiting (2.92 KB, patch)
2013-03-11 22:00 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
messageTray: Remove locking (4.17 KB, patch)
2013-03-11 22:00 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
messageTray: Remove summary state management (9.17 KB, patch)
2013-03-11 22:00 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Fizzle out hover notifications where the values are the same (3.39 KB, patch)
2013-03-11 22:00 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Remove the tray left timeout when showing a new notification (1.07 KB, patch)
2013-03-11 22:00 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Use the bottom monitor's fullscreen state for rate limiting (3.00 KB, patch)
2013-03-11 23:31 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Remove locking (4.50 KB, patch)
2013-03-11 23:52 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-03-11 21:59:40 UTC
This fixes notifications not always disappearing when it's
shown up during activity, some notifications disappearing
too early in a row, and other cleanups.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-03-11 21:59:44 UTC
Created attachment 238627 [details] [review]
grabHelper: Use a round trip for focusing the default window

We may release the focus grab at any time, so it's not guaranteed
we'll be in event processing. In particular, hovering over and out
of a notification will cause this to happen, as the notification
is hidden on a timeout.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-03-11 21:59:48 UTC
Created attachment 238628 [details] [review]
messageTray: Remove a few leftover variables
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-03-11 21:59:51 UTC
Created attachment 238629 [details] [review]
messageTray: Fix style
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-03-11 21:59:55 UTC
Created attachment 238630 [details] [review]
messageTray: Clean up code a tiny bit

Remove some duplication by reusing a method.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-03-11 21:59:58 UTC
Created attachment 238631 [details] [review]
messageTray: Fix idle tracking condition

The user is active if they have less than IDLETIME, not if
they have more than it.

This fixes an issue where notifications may never go away.
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-03-11 22:00:01 UTC
Created attachment 238632 [details] [review]
messageTray: Use the bottom monitor's fullscreen state for rate limiting

It makes more sense to use the monitor the tray is on, rather than the
primary monitor. This also matches us with whether we can open the tray
from a barrier/dwell or not.
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-03-11 22:00:04 UTC
Created attachment 238633 [details] [review]
messageTray: Remove locking

The only way that locking happens is with when the summary box
pointer is active. As it can only happen if the summary state
is active, it's impossible for a notification to be expired,
or the summary to be hidden while it's showing.
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-03-11 22:00:07 UTC
Created attachment 238634 [details] [review]
messageTray: Remove summary state management

Now that the tray is modal, the summary is tied to the tray,
and we don't need to have separate states for the tray and
summary. This also removes the nearly invisible opacity tween
on the summary items when opening the message tray.
Comment 9 Jasper St. Pierre (not reading bugmail) 2013-03-11 22:00:11 UTC
Created attachment 238635 [details] [review]
messageTray: Fizzle out hover notifications where the values are the same

notify::* doesn't guarantee that the value has changed, only that it
may have been. We need to ensure that we track the old value to make sure
we don't do things like overwrite timeouts if they already exist.
Comment 10 Jasper St. Pierre (not reading bugmail) 2013-03-11 22:00:14 UTC
Created attachment 238636 [details] [review]
messageTray: Remove the tray left timeout when showing a new notification
Comment 11 Giovanni Campagna 2013-03-11 22:12:17 UTC
Review of attachment 238627 [details] [review]:

Sad, but necessary, I guess.
Comment 12 Giovanni Campagna 2013-03-11 22:12:44 UTC
Review of attachment 238628 [details] [review]:

Yes.
Comment 13 Giovanni Campagna 2013-03-11 22:16:20 UTC
Review of attachment 238629 [details] [review]:

Ok
Comment 14 Giovanni Campagna 2013-03-11 22:17:01 UTC
Review of attachment 238630 [details] [review]:

Looks right
Comment 15 Giovanni Campagna 2013-03-11 22:17:43 UTC
Review of attachment 238631 [details] [review]:

Ups, nice catch.
Comment 16 Giovanni Campagna 2013-03-11 22:18:53 UTC
Review of attachment 238632 [details] [review]:

Uhm... don't we need to show limited notifications when we close/hide a fullscreen app?
Comment 17 Giovanni Campagna 2013-03-11 22:20:03 UTC
Review of attachment 238633 [details] [review]:

Yeah, looks correct.
Comment 18 Giovanni Campagna 2013-03-11 22:21:25 UTC
Review of attachment 238634 [details] [review]:

Again, looks correct.
Comment 19 Giovanni Campagna 2013-03-11 22:22:28 UTC
Review of attachment 238635 [details] [review]:

Right.
Comment 20 Giovanni Campagna 2013-03-11 22:22:53 UTC
Review of attachment 238636 [details] [review]:

Yes.
Comment 21 Giovanni Campagna 2013-03-11 22:23:46 UTC
Ok, I marked most of the patches acn, because they look good to me, but I'd like to test them first, because they touch sensitive and fragile code.
Comment 22 Jasper St. Pierre (not reading bugmail) 2013-03-11 23:31:13 UTC
Created attachment 238642 [details] [review]
messageTray: Use the bottom monitor's fullscreen state for rate limiting

It makes more sense to use the monitor the tray is on, rather than the
primary monitor. This also matches us with whether we can open the tray
from a barrier/dwell or not.
Comment 23 Jasper St. Pierre (not reading bugmail) 2013-03-11 23:52:03 UTC
Created attachment 238645 [details] [review]
messageTray: Remove locking

The only way that locking happens is with when the summary box
pointer is active. As it can only happen if the summary state
is active, it's impossible for a notification to be expired,
or the summary to be hidden while it's showing.



Removed a missed _unlock() call when closing context menus.
Comment 24 Giovanni Campagna 2013-03-12 13:52:55 UTC
Review of attachment 238642 [details] [review]:

This is correct.
Comment 25 Giovanni Campagna 2013-03-12 13:53:45 UTC
Review of attachment 238645 [details] [review]:

Weird, I don't get an exception here. Oh well, this is obviously right.
Comment 26 Jasper St. Pierre (not reading bugmail) 2013-03-12 15:59:14 UTC
Attachment 238627 [details] pushed as 8301acd - grabHelper: Use a round trip for focusing the default window
Attachment 238628 [details] pushed as 81b71cc - messageTray: Remove a few leftover variables
Attachment 238629 [details] pushed as 9eeabf7 - messageTray: Fix style
Attachment 238630 [details] pushed as 16547fb - messageTray: Clean up code a tiny bit
Attachment 238631 [details] pushed as 78dacfa - messageTray: Fix idle tracking condition
Attachment 238634 [details] pushed as f864303 - messageTray: Remove summary state management
Attachment 238635 [details] pushed as 9140558 - messageTray: Fizzle out hover notifications where the values are the same
Attachment 238636 [details] pushed as 4771f80 - messageTray: Remove the tray left timeout when showing a new notification
Attachment 238642 [details] pushed as 725a36e - messageTray: Use the bottom monitor's fullscreen state for rate limiting
Attachment 238645 [details] pushed as e5ebf4a - messageTray: Remove locking