GNOME Bugzilla – Bug 731118
messageTray: Fix an edge case in notification hiding
Last modified: 2014-06-02 21:40:26 UTC
Fix an edge where a new notification that pops up closes super fast after the user clicks on the close button on the previous notification.
Created attachment 277748 [details] [review] messageTray: Don't exit out early if we have a left timeout Otherwise, we won't mark the pointer as hovering on the notification.
Created attachment 277749 [details] [review] messageTray: Squash together some duplicated code
Created attachment 277750 [details] [review] messageTray: Clear the pointer left timeout when showing a notification When the pointer leaves the notification area, we queue a timeout to hide the notification after a little while. If the user is hovering over a notification and clicks the X button to close the notification, we will destroy the notification, which causes a "pointer left" event on the notification area. This queues a timeout which erroneously fires after the next notification in the queue shows up. The code and state machine are too complex to properly make sure this timeout doesn't fire when there is no notification up next, so instead just clear it when showing a notification to make sure that any previously queued timeout doesn't apply to us.
Review of attachment 277748 [details] [review]: OK.
Review of attachment 277749 [details] [review]: ::: js/ui/messageTray.js @@ -2284,3 @@ - this._notificationLeftMouseX = -1; - this._notificationLeftMouseY = -1; - } Did you mean to replace this with _resetNotificationLeftTimeout()? Otherwise this does not belong in a cleanup patch.
Review of attachment 277750 [details] [review]: OK
Attachment 277748 [details] pushed as 524e2df - messageTray: Don't exit out early if we have a left timeout Attachment 277749 [details] pushed as f6b5385 - messageTray: Squash together some duplicated code Attachment 277750 [details] pushed as 094669b - messageTray: Clear the pointer left timeout when showing a notification Yeah, that was an obvious mistake. Whoops. Fixed and pushed.