diff --git a/Loop/Window Management/Window Manipulation/ResizeContext.swift b/Loop/Window Management/Window Manipulation/ResizeContext.swift index 237db048..ad5753ea 100644 --- a/Loop/Window Management/Window Manipulation/ResizeContext.swift +++ b/Loop/Window Management/Window Manipulation/ResizeContext.swift @@ -131,6 +131,18 @@ final class ResizeContext { } private func recomputeTargetFrame() { + // No-op / no-frame actions (.noAction, .noSelection, .cycle, .minimize, .hide) and + // window-focus actions return a zero-size sentinel from `getFrame`. Caching that + // sentinel would clobber `cachedTargetFrame.raw`, which grow/shrink/move actions use + // as their base frame while nothing has been applied yet (preview-only chords) — + // making a subsequent grow resize from a zero-size box at screen center instead of + // the window's real frame. Preserve the previously-cached real frame for these. + let noFrameActions: [WindowDirection] = [.noAction, .noSelection, .cycle, .minimize, .hide] + guard !noFrameActions.contains(action.direction), !action.direction.willFocusWindow else { + needsRecompute = false + return + } + let result = WindowFrameResolver.getFrame(resizeContext: self) let normalized = CGRect(