Skip to content

Commit

Permalink
fix: improved focus switching
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciech-kulik committed Jan 24, 2025
1 parent 7154a26 commit e7fa1f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FlashSpace/Focus/FocusManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,28 @@ final class FocusManager {

func focusRight() {
focus { focusedAppFrame, other in
other.midX > focusedAppFrame.maxX &&
other.maxX > focusedAppFrame.maxX &&
other.verticalIntersects(with: focusedAppFrame)
}
}

func focusLeft() {
focus { focusedAppFrame, other in
other.midX < focusedAppFrame.minX &&
other.minX < focusedAppFrame.minX &&
other.verticalIntersects(with: focusedAppFrame)
}
}

func focusDown() {
focus { focusedAppFrame, other in
other.midY > focusedAppFrame.maxY &&
other.maxY > focusedAppFrame.maxY &&
other.horizontalIntersects(with: focusedAppFrame)
}
}

func focusUp() {
focus { focusedAppFrame, other in
other.midY < focusedAppFrame.minY &&
other.minY < focusedAppFrame.minY &&
other.horizontalIntersects(with: focusedAppFrame)
}
}
Expand Down

0 comments on commit e7fa1f1

Please sign in to comment.