From 292ac413c80f3fdd907dec14468638647de2466e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 20 Jun 2017 10:16:05 +0200 Subject: [PATCH] panel: Consider visibility changes for solid style We currently assume that window state changes are accompanied by an allocation change (triggered for example by the minimize animation). However this misses the case where a window actor is simply hidden without any transition, as is the case with the 'show-desktop' action for instance, so start tracking plain visibility changes as well. https://bugzilla.gnome.org/show_bug.cgi?id=783975 --- js/ui/panel.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index 83fda0ea8..52c89d79c 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -823,12 +823,17 @@ const Panel = new Lang.Class({ }, _onWindowActorAdded: function(container, metaWindowActor) { - let signalId = metaWindowActor.connect('allocation-changed', Lang.bind(this, this._updateSolidStyle)); - this._trackedWindows.set(metaWindowActor, signalId); + let signalIds = []; + ['allocation-changed', 'notify::visible'].forEach(s => { + signalIds.push(metaWindowActor.connect(s, Lang.bind(this, this._updateSolidStyle))); + }); + this._trackedWindows.set(metaWindowActor, signalIds); }, _onWindowActorRemoved: function(container, metaWindowActor) { - metaWindowActor.disconnect(this._trackedWindows.get(metaWindowActor)); + this._trackedWindows.get(metaWindowActor).forEach(id => { + metaWindowActor.disconnect(id); + }); this._trackedWindows.delete(metaWindowActor); this._updateSolidStyle(); },