From 79b8be85e5d85253bb84bb35cde5713d5e92799e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Thu, 14 Mar 2019 13:15:35 +0100 Subject: [PATCH] navigator: Add 3.30 compatibility --- navigator.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/navigator.js b/navigator.js index 56f5cb1..cfd2a24 100644 --- a/navigator.js +++ b/navigator.js @@ -30,9 +30,6 @@ var display = global.display; var scale = 0.9; var navigating = false; -// Dummy class to satisfy `SwitcherPopup.SwitcherPopup` - - var PreviewedWindowNavigator = utils.registerClass( class PreviewedWindowNavigator extends SwitcherPopup.SwitcherPopup { _init() { @@ -43,14 +40,20 @@ class PreviewedWindowNavigator extends SwitcherPopup.SwitcherPopup { // HACK: workaround to enable moving from empty workspace. See check in // SwitcherPopup.show super._init([1]); + if (!('actor' in this)) { // 3.30 compat + this.actor = this; + } this._switcherList = new SwitcherPopup.SwitcherList(); + if (!('actor' in this._switcherList)) { + this._switcherList.actor = this._switcherList; + } debug('#preview', 'init', this._switcherList); } _initialSelection(backward, actionName) { debug('#preview', '_initialSelection'); this.navigator = getNavigator(); - this._switcherList.hide(); + this._switcherList.actor.hide(); let actionId = Keybindings.idOf(actionName); if(actionId === Meta.KeyBindingAction.NONE) { try { @@ -112,7 +115,7 @@ class PreviewedWindowNavigator extends SwitcherPopup.SwitcherPopup { } destroy() { - this.hide(); // Prevents finalized crap + this.actor.hide(); // Prevents finalized crap super.destroy(); this.navigator.destroy(); }