Skip to content

The agent that grows with you

fix(desktop): preserve zoom across Windows maximize

Sylvester Kaczmarekf92ef3c17c33
diff --git a/apps/desktop/electron/zoom.ts b/apps/desktop/electron/zoom.ts
index 20471174cf5..2fe42643231 100644
--- a/apps/desktop/electron/zoom.ts
+++ b/apps/desktop/electron/zoom.ts
@@ -74,9 +74,15 @@ export const ZOOM_REASSERT_SETTLE_DELAY_MS = 300
export const ZOOM_REASSERT_MAX_SETTLE_CHECKS = 3
export function zoomReassertWindowEvents(platform = process.platform) {
- return platform === 'linux'
- ? ['show', 'restore', 'focus', 'resize', 'move']
- : ['show', 'restore', 'focus', 'resized', 'moved']
+ if (platform === 'linux') {
+ return ['show', 'restore', 'focus', 'resize', 'move']
+ }
+
+ if (platform === 'win32') {
+ return ['show', 'restore', 'focus', 'maximize', 'unmaximize', 'resized', 'moved']
+ }
+
+ return ['show', 'restore', 'focus', 'resized', 'moved']
}
// Linux/Wayland fires `focus` on intra-app focus shifts (sidebar clicks,