Fix a break for GNOME 46, clean some things up
This commit is contained in:
parent
5f20d11a5b
commit
bfe5cfb578
|
|
@ -61,13 +61,17 @@ export class CursorManager {
|
|||
this._cursorRoot.add_child(this._mouseSprite);
|
||||
}
|
||||
|
||||
_backend() {
|
||||
return global.stage.get_context?.().get_backend() ?? Clutter.get_default_backend();
|
||||
}
|
||||
|
||||
_hideSystemCursor() {
|
||||
this._systemCursorShown = false;
|
||||
|
||||
this._cursorRoot.show();
|
||||
|
||||
if (!this._cursorUnfocusInhibited) {
|
||||
global.stage.get_context().get_backend().get_default_seat().inhibit_unfocus();
|
||||
this._backend().get_default_seat().inhibit_unfocus();
|
||||
this._cursorUnfocusInhibited = true;
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +152,7 @@ export class CursorManager {
|
|||
if (this._cursorRoot) this._cursorRoot.hide();
|
||||
|
||||
if (this._cursorUnfocusInhibited) {
|
||||
global.stage.get_context().get_backend().get_default_seat().uninhibit_unfocus();
|
||||
this._backend().get_default_seat().uninhibit_unfocus();
|
||||
this._cursorUnfocusInhibited = false;
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +215,7 @@ export class CursorManager {
|
|||
this.xRel = xRel;
|
||||
this.xRel = xRel;
|
||||
|
||||
const seat = global.stage.get_context().get_backend().get_default_seat();
|
||||
const seat = this._backend().get_default_seat();
|
||||
if (this._cursorUnfocusInhibited && !seat.is_unfocus_inhibited()) {
|
||||
Globals.logger.log_debug('reinhibiting');
|
||||
seat.inhibit_unfocus();
|
||||
|
|
|
|||
|
|
@ -221,7 +221,6 @@ export default class BreezyDesktopExtension extends Extension {
|
|||
this._virtual_displays_overlay.set_position(targetMonitor.x, targetMonitor.y);
|
||||
this._virtual_displays_overlay.set_size(targetMonitor.width, targetMonitor.height);
|
||||
|
||||
// const textureSourceActor = Main.layoutManager.uiGroup;
|
||||
Globals.data_stream.refresh_data();
|
||||
this._virtual_displays_actor = new VirtualDisplaysActor({
|
||||
width: targetMonitor.width,
|
||||
|
|
|
|||
|
|
@ -255,7 +255,6 @@ export const VirtualDisplayEffect = GObject.registerClass({
|
|||
const toggleDelayMs = (Date.now() - toggleTime) * 0.75;
|
||||
const slerpStartTime = toggleTime + toggleDelayMs;
|
||||
|
||||
const dataAge = Date.now() - this.imu_snapshots.timestamp_ms;
|
||||
if (to !== from) {
|
||||
this._follow_ease_timeline = Clutter.Timeline.new_for_actor(
|
||||
this.get_actor(),
|
||||
|
|
@ -299,7 +298,6 @@ export const VirtualDisplayEffect = GObject.registerClass({
|
|||
_update_display_position_uniforms() {
|
||||
// this is in NWU coordinates
|
||||
const monitorPlacement = this.monitor_placements[this.monitor_index];
|
||||
// Globals.logger.log_debug(`\t\t\tMonitor ${this.monitor_index} vectors: ${JSON.stringify(monitorPlacement)}`);
|
||||
|
||||
// use the center vector with the distance applied to determine how much to move each coordinate, so they all move uniformly
|
||||
const inverseAppliedDistance = 1.0 - this._current_display_distance / this.display_distance_default;
|
||||
|
|
@ -497,7 +495,7 @@ export const VirtualDisplayEffect = GObject.registerClass({
|
|||
}
|
||||
|
||||
let lookAheadSet = false;
|
||||
if (!this._use_smooth_follow_origin && (this._is_focused() || this._current_follow_ease_progress > 0.0 || !this.smooth_follow_enabled)) {
|
||||
if (!this._use_smooth_follow_origin && (!this.smooth_follow_enabled || this._is_focused() || this._current_follow_ease_progress > 0.0)) {
|
||||
if (this._current_follow_ease_progress > 0.0 && this._current_follow_ease_progress < 1.0) {
|
||||
// don't apply look-ahead while the display is slerping
|
||||
this.set_uniform_float(this.get_uniform_location('u_look_ahead_ms'), 1, [0.0]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue