diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 4f182eccd..5a14aca9e 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1562,10 +1562,11 @@ const AppIcon = new Lang.Class({ this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); this._menuTimeoutId = 0; - this._stateChangedId = this.app.connect('notify::state', - Lang.bind(this, - this._onStateChanged)); - this._onStateChanged(); + this._stateChangedId = this.app.connect('notify::state', Lang.bind(this, + function () { + this._updateRunningStyle(); + })); + this._updateRunningStyle(); }, _onDestroy: function() { @@ -1586,7 +1587,7 @@ const AppIcon = new Lang.Class({ } }, - _onStateChanged: function() { + _updateRunningStyle: function() { if (this.app.state != Shell.AppState.STOPPED) this.actor.add_style_class_name('running'); else