[gnome-shell] boxpointer: Don't use boxpointer actor, as it's now an actor itself



commit 1be933bc490b098f589d51d50bcde0c01561c8f5
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Tue Apr 9 15:21:15 2019 -0500

    boxpointer: Don't use boxpointer actor, as it's now an actor itself
    
    Remove this.actor = actor, since the class is now an actor itself.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/487

 js/misc/util.js             | 2 +-
 js/ui/appDisplay.js         | 8 ++++----
 js/ui/boxpointer.js         | 2 --
 js/ui/ibusCandidatePopup.js | 4 ++--
 js/ui/keyboard.js           | 4 ++--
 js/ui/popupMenu.js          | 2 +-
 6 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/js/misc/util.js b/js/misc/util.js
index a8bea649f..d944367ce 100644
--- a/js/misc/util.js
+++ b/js/misc/util.js
@@ -366,7 +366,7 @@ class CloseButton extends St.Button {
     }
 
     _computeBoxPointerOffset() {
-        if (!this._boxPointer || !this._boxPointer.actor.get_stage())
+        if (!this._boxPointer || !this._boxPointer.get_stage())
             return 0;
 
         let side = this._boxPointer.arrowSide;
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 16df9ca0d..8b7dec7dc 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1301,16 +1301,16 @@ var AppFolderPopup = class AppFolderPopup {
                                                        x_expand: true,
                                                        x_align: St.Align.START });
 
-        this._boxPointer.actor.style_class = 'app-folder-popup';
-        this.actor.add_actor(this._boxPointer.actor);
+        this._boxPointer.style_class = 'app-folder-popup';
+        this.actor.add_actor(this._boxPointer);
         this._boxPointer.bin.set_child(this._view.actor);
 
         this.closeButton = Util.makeCloseButton(this._boxPointer);
         this.closeButton.connect('clicked', this.popdown.bind(this));
         this.actor.add_actor(this.closeButton);
 
-        this._boxPointer.actor.bind_property('opacity', this.closeButton, 'opacity',
-                                             GObject.BindingFlags.SYNC_CREATE);
+        this._boxPointer.bind_property('opacity', this.closeButton, 'opacity',
+                                       GObject.BindingFlags.SYNC_CREATE);
 
         global.focus_manager.add_group(this.actor);
 
diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js
index c8e5ceda7..188e8386f 100644
--- a/js/ui/boxpointer.js
+++ b/js/ui/boxpointer.js
@@ -33,8 +33,6 @@ var BoxPointer = GObject.registerClass({
     _init(arrowSide, binProperties) {
         super._init();
 
-        this.actor = this;
-
         this.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
 
         this._arrowSide = arrowSide;
diff --git a/js/ui/ibusCandidatePopup.js b/js/ui/ibusCandidatePopup.js
index 20d76fd86..fe421c557 100644
--- a/js/ui/ibusCandidatePopup.js
+++ b/js/ui/ibusCandidatePopup.js
@@ -272,7 +272,7 @@ var CandidatePopup = class CandidatePopup {
 
     _setDummyCursorGeometry(x, y, w, h) {
         Main.layoutManager.setDummyCursorGeometry(x, y, w, h);
-        if (this._boxPointer.actor.visible)
+        if (this._boxPointer.visible)
             this._boxPointer.setPosition(Main.layoutManager.dummyCursor, 0);
     }
 
@@ -285,7 +285,7 @@ var CandidatePopup = class CandidatePopup {
         if (isVisible) {
             this._boxPointer.setPosition(Main.layoutManager.dummyCursor, 0);
             this._boxPointer.open(BoxPointer.PopupAnimation.NONE);
-            this._boxPointer.actor.raise_top();
+            this._boxPointer.raise_top();
         } else {
             this._boxPointer.close(BoxPointer.PopupAnimation.NONE);
         }
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 8dc1b306f..c19930f8d 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -282,11 +282,11 @@ var Key = class Key {
                                                        y_fill: true,
                                                        x_align: St.Align.START });
         this._boxPointer.hide();
-        Main.layoutManager.addChrome(this._boxPointer.actor);
+        Main.layoutManager.addChrome(this._boxPointer);
         this._boxPointer.setPosition(this.keyButton, 0.5);
 
         // Adds style to existing keyboard style to avoid repetition
-        this._boxPointer.actor.add_style_class_name('keyboard-subkeys');
+        this._boxPointer.add_style_class_name('keyboard-subkeys');
         this._getExtendedKeys();
         this.keyButton._extended_keys = this._extended_keyboard;
     }
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 44818533a..81d5a86b5 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -853,7 +853,7 @@ var PopupMenu = class extends PopupMenuBase {
         if (this._activeMenuItem)
             this._activeMenuItem.setActive(false);
 
-        if (this._boxPointer.actor.visible) {
+        if (this._boxPointer.visible) {
             this._boxPointer.close(animate, () => {
                 this.emit('menu-closed');
             });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]