Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion Loop/Window Management/Window Action/IconView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ final class IconRenderView: NSView {
let frame = WindowFrameResolver.getFrame(
for: currentAction,
window: nil,
bounds: .init(origin: .zero, size: .init(width: 1, height: 1))
bounds: .init(origin: .zero, size: .init(width: 1, height: 1)),
padding: .zero
).flipY(maxY: 1)

if frame.size.area != 0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ final class ResizeContext {
initialFrame: CGRect? = nil,
screen: NSScreen? = nil,
bounds: CGRect? = nil,
padding: PaddingConfiguration? = nil,
action: WindowAction = .init(.noSelection),
parentAction: WindowAction? = nil,
initialMousePosition: CGPoint = .zero
) {
let frame = initialFrame ?? window?.frame ?? .zero
let bounds = bounds ?? screen?.cgSafeScreenFrame ?? .zero
let padding = PaddingConfiguration.getConfiguredPadding(for: screen)
let padding = padding ?? PaddingConfiguration.getConfiguredPadding(for: screen)

self.window = window
self.cachedTargetFrame = ComputedFrame(raw: frame, normalized: .zero, padded: frame)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ enum WindowFrameResolver {
static func getFrame(
for action: WindowAction,
window: Window?,
bounds: CGRect
bounds: CGRect,
padding: PaddingConfiguration? = nil
) -> CGRect {
let context = ResizeContext(window: window, bounds: bounds, action: action)
let context = ResizeContext(window: window, bounds: bounds, padding: padding, action: action)
return getFrame(resizeContext: context).frame
}

Expand Down