From 5260c8336bd4ef5e49029659b14c0b39fd2533a5 Mon Sep 17 00:00:00 2001 From: Joseph Robinson <166070458+Robinson-Joseph@users.noreply.github.com> Date: Mon, 6 Oct 2025 14:13:43 -0400 Subject: [PATCH] Makes a small change to center the window of the desktop app when bounds change ([#2617](https://github.com/bitwarden/clients/issues/2617)) (#16595) This is my first commit, and I don't believe this would count as a major UX change so I have not made a forum post. --- apps/desktop/src/main/window.main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/main/window.main.ts b/apps/desktop/src/main/window.main.ts index 1595252251b..993084f7724 100644 --- a/apps/desktop/src/main/window.main.ts +++ b/apps/desktop/src/main/window.main.ts @@ -500,9 +500,9 @@ export class WindowMain { displayBounds.x !== state.displayBounds.x || displayBounds.y !== state.displayBounds.y ) { - state.x = undefined; - state.y = undefined; displayBounds = screen.getPrimaryDisplay().bounds; + state.x = displayBounds.x + displayBounds.width / 2 - state.width / 2; + state.y = displayBounds.y + displayBounds.height / 2 - state.height / 2; } }