From 5caa4d14f583aa1a77bf1edf5eb6773ccb28f620 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Wed, 23 Feb 2022 20:23:25 +0100 Subject: [PATCH] fixed docked window overlapping the Windows taskbar - fixes #5799, fixes #3522, fixes #4839, fixes #2900 --- .../src/services/docking.service.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tabby-electron/src/services/docking.service.ts b/tabby-electron/src/services/docking.service.ts index c213146a..522f6fd2 100644 --- a/tabby-electron/src/services/docking.service.ts +++ b/tabby-electron/src/services/docking.service.ts @@ -45,26 +45,26 @@ export class ElectronDockingService extends DockingService { const [minWidth, minHeight] = this.hostWindow.getWindow().getMinimumSize() if (dockSide === 'left' || dockSide === 'right') { - newBounds.width = Math.max(minWidth, Math.round(fill * display.bounds.width)) - newBounds.height = Math.round(display.bounds.height * space) + newBounds.width = Math.max(minWidth, Math.round(fill * display.workArea.width)) + newBounds.height = Math.round(display.workArea.height * space) } if (dockSide === 'top' || dockSide === 'bottom') { - newBounds.width = Math.round(display.bounds.width * space) - newBounds.height = Math.max(minHeight, Math.round(fill * display.bounds.height)) + newBounds.width = Math.round(display.workArea.width * space) + newBounds.height = Math.max(minHeight, Math.round(fill * display.workArea.height)) } if (dockSide === 'right') { - newBounds.x = display.bounds.x + display.bounds.width - newBounds.width + newBounds.x = display.workArea.x + display.workArea.width - newBounds.width } else if (dockSide === 'left') { - newBounds.x = display.bounds.x + newBounds.x = display.workArea.x } else { - newBounds.x = display.bounds.x + Math.round(display.bounds.width / 2 * (1 - space)) + newBounds.x = display.workArea.x + Math.round(display.workArea.width / 2 * (1 - space)) } if (dockSide === 'bottom') { - newBounds.y = display.bounds.y + display.bounds.height - newBounds.height + newBounds.y = display.workArea.y + display.workArea.height - newBounds.height } else if (dockSide === 'top') { - newBounds.y = display.bounds.y + newBounds.y = display.workArea.y } else { - newBounds.y = display.bounds.y + Math.round(display.bounds.height / 2 * (1 - space)) + newBounds.y = display.workArea.y + Math.round(display.workArea.height / 2 * (1 - space)) } const alwaysOnTop = this.config.store.appearance.dockAlwaysOnTop