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 685341 - messageTray: Fix some minor artifacts when tweening back from the tray
messageTray: Fix some minor artifacts when tweening back from the 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: 2012-10-02 22:29 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2012-10-06 19:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
messageTray: Fix some artifacts when tweening back from the tray (4.30 KB, patch)
2012-10-02 22:29 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Clean up and consolidate code for tween completion (1.29 KB, patch)
2012-10-02 22:29 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-10-02 22:29:49 UTC
If you look super closely, you can see that titlebar repaint isn't
exactly quite right when they're near the top of the screen. Slowing
down animations makes it more visible.

Turns out it's an issue with the desktop clone clip calculation.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-10-02 22:29:51 UTC
Created attachment 225639 [details] [review]
messageTray: Fix some artifacts when tweening back from the tray

The math to calculate the clip isn't quite right here -- it overcompensates
in the Y value.
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-10-02 22:29:55 UTC
Created attachment 225640 [details] [review]
messageTray: Clean up and consolidate code for tween completion
Comment 3 Rui Matos 2012-10-06 02:03:22 UTC
Review of attachment 225639 [details] [review]:

This is correct but why not the straightforward fix:

diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 8b27d3d..ea69cae 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2145,6 +2145,7 @@ const MessageTray = new Lang.Class({
             return;
         }
 
+        let anchor = this._desktopClone.y;
         let geometry = this._desktopClone.clip;
         this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
                     { y: 0,
@@ -2155,7 +2156,7 @@ const MessageTray = new Lang.Class({
                           this._desktopClone = null;
                       }),
                       onUpdate: function() {
-                          let progress = Math.round(-this.y);
+                          let progress = Math.round(- anchor + this.y);
                           this.set_clip(geometry.x,
                                         geometry.y - progress,
                                         geometry.width,

?

::: js/ui/messageTray.js
@@ +2110,3 @@
+                                        height: bottomMonitor.height };
+
+        let geometry = new Clutter.Geometry();

leftover?

@@ +2156,3 @@
         }
 
+        let geometry = this._desktopClone.origGeometry;

leftover?
Comment 4 Rui Matos 2012-10-06 02:03:49 UTC
Review of attachment 225640 [details] [review]:

Ok
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-10-06 19:09:47 UTC
Attachment 225639 [details] pushed as 9fac285 - messageTray: Fix some artifacts when tweening back from the tray
Attachment 225640 [details] pushed as be24ee4 - messageTray: Clean up and consolidate code for tween completion


Thanks. The other cleanups have been fixed.