Skip to content

Commit

Permalink
docking: adapt ControlsManagerLayout spacing for GNOME 46
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky authored and 3v1n0 committed Mar 25, 2024
1 parent 554f7c5 commit 07cd4c5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docking.js
Original file line number Diff line number Diff line change
Expand Up @@ -2355,7 +2355,10 @@ export class DockManager {
workAreaBox.set_origin(startX, startY);
workAreaBox.set_size(workArea.width, workArea.height);

maybeAdjustBoxToDock(undefined, workAreaBox, this.spacing);
// GNOME 46 changes "spacing" to "_spacing".
const spacing = this.spacing ?? this._spacing;

maybeAdjustBoxToDock(undefined, workAreaBox, spacing);
const oldStartY = workAreaBox.y1;

const propertyInjections = new Utils.PropertyInjectionsHandler();
Expand Down Expand Up @@ -2412,7 +2415,9 @@ export class DockManager {
return originalFunction.call(this, state, ...args);

const box = workspaceBoxOriginFixer.call(this, originalFunction, state, ...args);
return maybeAdjustBoxSize(state, box, this.spacing);
// GNOME 46 changes "spacing" to "_spacing".
const spacing = this.spacing ?? this._spacing;
return maybeAdjustBoxSize(state, box, spacing);
/* eslint-enable no-invalid-this */
},
], [
Expand Down

0 comments on commit 07cd4c5

Please sign in to comment.