GNOME Bugzilla – Bug 695659
Various fixes and cleanups for the message tray
Last modified: 2013-03-12 16:00:01 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.
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.
Created attachment 238628 [details] [review] messageTray: Remove a few leftover variables
Created attachment 238629 [details] [review] messageTray: Fix style
Created attachment 238630 [details] [review] messageTray: Clean up code a tiny bit Remove some duplication by reusing a method.
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.
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.
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.
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.
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.
Created attachment 238636 [details] [review] messageTray: Remove the tray left timeout when showing a new notification
Review of attachment 238627 [details] [review]: Sad, but necessary, I guess.
Review of attachment 238628 [details] [review]: Yes.
Review of attachment 238629 [details] [review]: Ok
Review of attachment 238630 [details] [review]: Looks right
Review of attachment 238631 [details] [review]: Ups, nice catch.
Review of attachment 238632 [details] [review]: Uhm... don't we need to show limited notifications when we close/hide a fullscreen app?
Review of attachment 238633 [details] [review]: Yeah, looks correct.
Review of attachment 238634 [details] [review]: Again, looks correct.
Review of attachment 238635 [details] [review]: Right.
Review of attachment 238636 [details] [review]: Yes.
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.
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.
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.
Review of attachment 238642 [details] [review]: This is correct.
Review of attachment 238645 [details] [review]: Weird, I don't get an exception here. Oh well, this is obviously right.
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