From 4c4a703e6394fbf503e3291b415228318dc4b30d Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 7 Jan 2011 11:59:20 -0500 Subject: [PATCH] messageTray: use alignment rather than gravity to position the summary Actors in clutter are supposed to be re-allocated with Clutter.AllocationFlags.ABSOLUTE_ORIGIN_CHANGED if they move relative to the screen, even if they don't move relative to their parent. Currently this does not work correctly for actors inside containers with non-northwest gravity. This is probably a fixable bug, but gravity has messed up other things in the past too, so let's just not use it. This change ensures that summary trayicons are re-allocated when the summary animates, and is part of the fix for https://bugzilla.gnome.org/show_bug.cgi?id=635695 --- js/ui/messageTray.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 359327418..04a968b56 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -916,7 +916,7 @@ MessageTray.prototype = { this._notification = null; this._notificationClickedId = 0; - this._summaryBin = new St.Bin({ anchor_gravity: Clutter.Gravity.NORTH_EAST }); + this._summaryBin = new St.Bin({ x_align: St.Align.END }); this.actor.add_actor(this._summaryBin); this._summary = new St.BoxLayout({ name: 'summary-mode', reactive: true, @@ -1008,9 +1008,8 @@ MessageTray.prototype = { this.actor.width = primary.width; this._notificationBin.x = 0; this._notificationBin.width = primary.width; - - // These work because of their anchor_gravity - this._summaryBin.x = primary.width; + this._summaryBin.x = 0; + this._summaryBin.width = primary.width; }, contains: function(source) {