Don't display label on full-screen windows

This commit is contained in:
Bruce Leidl 2021-12-13 14:21:01 -05:00
parent b8480fcc75
commit 9d65932cd9

View File

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