[gnome-shell] panel: Consider visibility changes for solid style
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] panel: Consider visibility changes for solid style
- Date: Wed, 5 Jul 2017 14:50:14 +0000 (UTC)
commit 292ac413c80f3fdd907dec14468638647de2466e
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jun 20 10:16:05 2017 +0200
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 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 83fda0e..52c89d7 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();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]