diff options
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/packages/desktop/src/main/window-controller.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gui/packages/desktop/src/main/window-controller.js b/gui/packages/desktop/src/main/window-controller.js index 9e30529dda..dc6165c5f3 100644 --- a/gui/packages/desktop/src/main/window-controller.js +++ b/gui/packages/desktop/src/main/window-controller.js @@ -36,8 +36,11 @@ class AttachedToTrayWindowPositioning implements WindowPositioning { const windowBounds = window.getBounds(); const trayBounds = this._tray.getBounds(); - const primaryDisplay = screen.getPrimaryDisplay(); - const workArea = primaryDisplay.workArea; + const activeDisplay = screen.getDisplayNearestPoint({ + x: trayBounds.x, + y: trayBounds.y, + }); + const workArea = activeDisplay.workArea; const placement = this._getTrayPlacement(); const maxX = workArea.x + workArea.width - windowBounds.width; const maxY = workArea.y + workArea.height - windowBounds.height; |
