From 3443a1844572a05cc2b42d40974f3f0a273d1c7c Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 7 Jun 2022 18:13:53 +0800 Subject: [PATCH] replace addTopChrome with uiGroup.add_actor, fixes #7 --- activate_gnome@isjerryxiao/extension.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activate_gnome@isjerryxiao/extension.js b/activate_gnome@isjerryxiao/extension.js index 37969cf..755f6f4 100644 --- a/activate_gnome@isjerryxiao/extension.js +++ b/activate_gnome@isjerryxiao/extension.js @@ -41,8 +41,8 @@ class Extension { for (let monitor of Main.layoutManager.monitors) { let label_1 = new St.Label({style_class: 'label-1', text: text1, opacity}) let label_2 = new St.Label({style_class: 'label-2', text: text2, opacity}) - Main.layoutManager.addTopChrome(label_2, {"trackFullscreen": false}) - Main.layoutManager.addTopChrome(label_1, {"trackFullscreen": false}) + Main.layoutManager.uiGroup.add_actor(label_2, {"trackFullscreen": false}) + Main.layoutManager.uiGroup.add_actor(label_1, {"trackFullscreen": false}) this.labels.push(label_1) this.labels.push(label_2) let h = Math.max(0, Math.floor(monitor.height * vl2 - label_2.height)) @@ -54,7 +54,7 @@ class Extension { cleanup() { for (let label of this.labels) { - Main.layoutManager.removeChrome(label) + Main.layoutManager.uiGroup.remove_actor(label) label.destroy() } this.labels = []