userMenu: Don't update the presence icon immediately

If we don't freeze the presence icon, we can end up in a place where
we'll be updating the icon before we fade out the panel indicators when
coming back from the lock screen.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
This commit is contained in:
Jasper St. Pierre
2012-09-01 19:15:42 -03:00
parent ec01f5d5ee
commit f1ca96bbf0
3 changed files with 35 additions and 2 deletions

View File

@ -113,6 +113,21 @@ const Button = new Lang.Class({
this.setMenu(new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, 0));
this.setName(nameText);
this._frozenCount = 0;
},
freeze: function() {
this._frozenCount++;
},
thaw: function() {
this._frozenCount--;
if (this._frozenCount == 0)
this.emit('thawed');
},
get frozen() {
return this._frozenCount > 0;
},
setSensitive: function(sensitive) {