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: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/266>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user