Skip to content

Commit

Permalink
Fix bug when trying to resolve the active window in `SystemWindowRela…
Browse files Browse the repository at this point in the history
…tiveFocus`
  • Loading branch information
zenangst committed Oct 23, 2024
1 parent 98bcc4d commit abdef61
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ final class SystemWindowRelativeFocus {
}

let windows = indexWindowsInStage(getWindows())
let activeProcessIdentifier = Int(snapshot.frontmostApplication.ref.processIdentifier)

guard let activeWindow = windows.first else { return }
guard let activeWindow = windows.first(where: { $0.ownerPid == activeProcessIdentifier }) else { return }

let previousWindow = activeWindow
let match = try await navigation.findNextWindow(activeWindow, windows: windows, direction: direction)
Expand Down

0 comments on commit abdef61

Please sign in to comment.