Adapt to fixed Meta functions namespace
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3546>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import Clutter from 'gi://Clutter';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import St from 'gi://St';
|
||||
|
||||
import * as Main from './main.js';
|
||||
@@ -53,9 +52,9 @@ export const BoxPointer = GObject.registerClass({
|
||||
|
||||
this.connect('notify::visible', () => {
|
||||
if (this.visible)
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
else
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -147,7 +147,7 @@ export const CloseDialog = GObject.registerClass({
|
||||
if (this._dialog != null)
|
||||
return;
|
||||
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
|
||||
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, ALIVE_TIMEOUT,
|
||||
() => {
|
||||
@@ -182,7 +182,7 @@ export const CloseDialog = GObject.registerClass({
|
||||
if (this._dialog == null)
|
||||
return;
|
||||
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
|
||||
GLib.source_remove(this._timeoutId);
|
||||
this._timeoutId = 0;
|
||||
|
@@ -126,11 +126,11 @@ function _easeActor(actor, params) {
|
||||
delete params.mode;
|
||||
|
||||
const prepare = () => {
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
global.begin_work();
|
||||
};
|
||||
const cleanup = () => {
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
global.end_work();
|
||||
};
|
||||
let callback = _makeEaseCallback(params, cleanup);
|
||||
@@ -202,11 +202,11 @@ function _easeActorProperty(actor, propName, target, params) {
|
||||
duration = 0;
|
||||
|
||||
const prepare = () => {
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
global.begin_work();
|
||||
};
|
||||
const cleanup = () => {
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
global.end_work();
|
||||
};
|
||||
let callback = _makeEaseCallback(params, cleanup);
|
||||
|
@@ -1788,7 +1788,7 @@ export const Keyboard = GObject.registerClass({
|
||||
}
|
||||
|
||||
_animateShow() {
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
|
||||
if (this._focusWindow)
|
||||
this._animateWindow(this._focusWindow, true);
|
||||
@@ -1844,7 +1844,7 @@ export const Keyboard = GObject.registerClass({
|
||||
|
||||
_animateHideComplete() {
|
||||
Main.layoutManager.keyboardBox.hide();
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
}
|
||||
|
||||
gestureProgress(delta) {
|
||||
|
@@ -5,7 +5,6 @@ import GDesktopEnums from 'gi://GDesktopEnums';
|
||||
import Gio from 'gi://Gio';
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
import * as Signals from '../misc/signals.js';
|
||||
@@ -100,8 +99,7 @@ export class Magnifier extends Signals.EventEmitter {
|
||||
this._zoomRegions = [];
|
||||
|
||||
// Create small clutter tree for the magnified mouse.
|
||||
let cursorTracker = Meta.CursorTracker.get_for_display(global.display);
|
||||
this._cursorTracker = cursorTracker;
|
||||
this._cursorTracker = global.backend.get_cursor_tracker();
|
||||
|
||||
this._mouseSprite = new Clutter.Actor({request_mode: Clutter.RequestMode.CONTENT_SIZE});
|
||||
this._mouseSprite.content = new MouseSpriteContent();
|
||||
@@ -188,12 +186,12 @@ export class Magnifier extends Signals.EventEmitter {
|
||||
this._updateMouseSprite();
|
||||
this._cursorTracker.connectObject(
|
||||
'cursor-changed', this._updateMouseSprite.bind(this), this);
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.display.disable_unredirect();
|
||||
this.startTrackingMouse();
|
||||
} else {
|
||||
this._cursorTracker.disconnectObject(this);
|
||||
this._mouseSprite.content.texture = null;
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.display.enable_unredirect();
|
||||
this.stopTrackingMouse();
|
||||
}
|
||||
|
||||
|
@@ -688,7 +688,7 @@ export function pushModal(actor, params = {}) {
|
||||
let grab = global.stage.grab(actor);
|
||||
|
||||
if (modalCount === 0)
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
|
||||
modalCount += 1;
|
||||
let actorDestroyId = actor.connect('destroy', () => {
|
||||
@@ -782,7 +782,7 @@ export function popModal(grab) {
|
||||
return;
|
||||
|
||||
layoutManager.modalEnded();
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
actionMode = Shell.ActionMode.NORMAL;
|
||||
}
|
||||
|
||||
|
@@ -1130,7 +1130,7 @@ export const MessageTray = GObject.registerClass({
|
||||
this._bannerBin.y = -this._banner.height;
|
||||
this.show();
|
||||
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
this._updateShowingNotification();
|
||||
|
||||
let [x, y] = global.get_pointer();
|
||||
@@ -1267,7 +1267,7 @@ export const MessageTray = GObject.registerClass({
|
||||
|
||||
this._pointerInNotification = false;
|
||||
this._notificationRemoved = false;
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
|
||||
this._banner.destroy();
|
||||
this._banner = null;
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import Clutter from 'gi://Clutter';
|
||||
import Gio from 'gi://Gio';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import St from 'gi://St';
|
||||
|
||||
|
||||
@@ -29,9 +28,9 @@ class OsdMonitorLabel extends St.Widget {
|
||||
Main.uiGroup.set_child_above_sibling(this, null);
|
||||
this._position();
|
||||
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
this.connect('destroy', () => {
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import Clutter from 'gi://Clutter';
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import St from 'gi://St';
|
||||
|
||||
import * as BarLevel from './barLevel.js';
|
||||
@@ -93,7 +92,7 @@ class OsdWindow extends Clutter.Actor {
|
||||
return;
|
||||
|
||||
if (!this.visible) {
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
super.show();
|
||||
this.opacity = 0;
|
||||
this.get_parent().set_child_above_sibling(this, null);
|
||||
@@ -128,7 +127,7 @@ class OsdWindow extends Clutter.Actor {
|
||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
onComplete: () => {
|
||||
this._reset();
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
},
|
||||
});
|
||||
return GLib.SOURCE_REMOVE;
|
||||
|
@@ -249,9 +249,9 @@ export class Overview extends Signals.EventEmitter {
|
||||
}
|
||||
|
||||
if (this._shownState === OverviewShownState.HIDDEN)
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
else if (state === OverviewShownState.HIDDEN)
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
|
||||
this._shownState = state;
|
||||
this.emit(OVERVIEW_SHOWN_TRANSITIONS[state].signal);
|
||||
|
@@ -137,7 +137,7 @@ export class ScreenShield extends Signals.EventEmitter {
|
||||
this._shortLightbox.connect('notify::active', this._onShortLightbox.bind(this));
|
||||
|
||||
this.idleMonitor = global.backend.get_core_idle_monitor();
|
||||
this._cursorTracker = Meta.CursorTracker.get_for_display(global.display);
|
||||
this._cursorTracker = global.backend.get_cursor_tracker();
|
||||
|
||||
this._syncInhibitor();
|
||||
}
|
||||
|
@@ -373,11 +373,11 @@ export class WorkspaceAnimationController {
|
||||
switchData.monitors.push(group);
|
||||
}
|
||||
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
global.compositor.disable_unredirect();
|
||||
}
|
||||
|
||||
_finishWorkspaceSwitch(switchData) {
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
global.compositor.enable_unredirect();
|
||||
|
||||
this._switchData = null;
|
||||
|
||||
|
Reference in New Issue
Block a user