Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docking: adapt ControlsManagerLayout spacing for GNOME 46 #2172

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading