From 1155170c7ca9d362ba2eb77af959cda23affe6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 15 Jul 2023 14:10:27 +0200 Subject: [PATCH] window-list: Stop using getCurrentExtension() The method is no longer exported. There will be a nicer alternative soon, in the meantime we can just keep track of our main Extension object ourselves. Part-of: --- extensions/window-list/extension.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index e233e096..540a2d90 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -13,7 +13,6 @@ const Main = imports.ui.main; const Overview = imports.ui.overview; const PopupMenu = imports.ui.popupMenu; -const Me = ExtensionUtils.getCurrentExtension(); import {WindowPicker, WindowPickerToggle} from './windowPicker.js'; import {WorkspaceIndicator} from './workspaceIndicator.js'; @@ -31,6 +30,8 @@ const GroupingMode = { ALWAYS: 2, }; +let Me = null; + /** * @param {Shell.App} app - an app * @returns {number} - the smallest stable sequence of the app's windows @@ -322,7 +323,7 @@ class BaseButton extends St.Button { let [x, y] = global.get_pointer(); let actor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y); - if (Me.stateObj.someWindowListContains(actor)) + if (Me.someWindowListContains(actor)) actor.sync_hover(); } @@ -1097,6 +1098,8 @@ export default class Extension { constructor() { ExtensionUtils.initTranslations(); + Me = this; + this._windowLists = null; this._hideOverviewOrig = Main.overview.hide; }