Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Loop/Window Management/Window Manipulation/ResizeContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down