We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3bd408 commit 9202191Copy full SHA for 9202191
1 file changed
Core/Sources/SuggestionWidget/WidgetWindowsController.swift
@@ -519,20 +519,17 @@ extension WidgetWindowsController {
519
} else {
520
guard let xcode = await xcodeInspector.safe.latestActiveXcode else { return }
521
let windowElements = xcode.appElement.windows
522
- let windowRects = windowElements.compactMap {
+ let overlap = windowElements.contains {
523
if let position = $0.position, let size = $0.size {
524
- return CGRect(
+ let rect = CGRect(
525
x: position.x,
526
y: position.y,
527
width: size.width,
528
height: size.height
529
)
530
+ return rect.intersects(window.frame)
531
}
- return nil
532
- }
533
-
534
- let overlap = windowRects.contains {
535
- $0.intersects(window.frame)
+ return false
536
537
538
window.setFloatOnTop(overlap)
0 commit comments