From 3f794cbe00f3947335a57c1139c8eb3fc617ffb7 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Mon, 13 Dec 2021 14:21:01 -0500 Subject: [PATCH] Don't display label on full-screen windows --- js/ui/realms/realmWindowFrame.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/js/ui/realms/realmWindowFrame.js b/js/ui/realms/realmWindowFrame.js index abd490239..e200102a1 100644 --- a/js/ui/realms/realmWindowFrame.js +++ b/js/ui/realms/realmWindowFrame.js @@ -73,9 +73,9 @@ class RealmFrameEffect extends Clutter.Effect { this._color = color; this._label_on_top = true; this._label = null; + this._label_text = label_text; if (label_text) { - this._label = this._createLabel(actor, label_text); this._updateLabel(actor.metaWindow); } @@ -111,6 +111,21 @@ class RealmFrameEffect extends Clutter.Effect { } _updateLabel(window) { + if (!this._label_text) { + return; + } + + if (window.is_fullscreen()) { + if (this._label) { + let actor = window.get_compositor_private(); + actor.remove_child(this._label); + this._label = null; + } + } else if (!this._label) { + let actor = window.get_compositor_private(); + this._label = this._createLabel(actor, this._label_text); + } + if (this._label) { this._updateLabelPosition(window); this._updateLabelColor();