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
This commit is contained in:
Florian Müllner 2017-06-20 10:16:05 +02:00
parent fdf988c04d
commit 292ac413c8

View File

@ -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();
},