GNOME Bugzilla – Bug 685341
messageTray: Fix some minor artifacts when tweening back from the tray
Last modified: 2012-10-06 19:09:52 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.
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.
Created attachment 225640 [details] [review] messageTray: Clean up and consolidate code for tween completion
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?
Review of attachment 225640 [details] [review]: Ok
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.