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 731118 - messageTray: Fix an edge case in notification hiding
messageTray: Fix an edge case in notification hiding
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: 2014-06-02 17:35 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2014-06-02 21:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
messageTray: Don't exit out early if we have a left timeout (1.10 KB, patch)
2014-06-02 17:35 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Squash together some duplicated code (2.53 KB, patch)
2014-06-02 17:35 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Clear the pointer left timeout when showing a notification (1.43 KB, patch)
2014-06-02 17:35 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2014-06-02 17:35:22 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.
Comment 1 Jasper St. Pierre (not reading bugmail) 2014-06-02 17:35:26 UTC
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.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-06-02 17:35:30 UTC
Created attachment 277749 [details] [review]
messageTray: Squash together some duplicated code
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-06-02 17:35:35 UTC
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.
Comment 4 Florian Müllner 2014-06-02 18:22:37 UTC
Review of attachment 277748 [details] [review]:

OK.
Comment 5 Florian Müllner 2014-06-02 18:22:53 UTC
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.
Comment 6 Florian Müllner 2014-06-02 18:23:14 UTC
Review of attachment 277750 [details] [review]:

OK
Comment 7 Jasper St. Pierre (not reading bugmail) 2014-06-02 21:40:15 UTC
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.