Voltaire & Tooltip & PCB, etc. // Fix NSWindow positioning.
This commit is contained in:
parent
5249ff5c0c
commit
1909e85a02
|
@ -161,7 +161,7 @@ public class ctlCandidate: NSWindowController, ctlCandidateProtocol {
|
|||
var adjustedPoint = windowTopLeftPoint
|
||||
var delta = heightDelta
|
||||
var screenFrame = NSScreen.main?.visibleFrame ?? NSRect.seniorTheBeast
|
||||
for frame in NSScreen.screens.map(\.visibleFrame).filter({ !$0.contains(windowTopLeftPoint) }) {
|
||||
for frame in NSScreen.screens.map(\.visibleFrame).filter({ $0.contains(windowTopLeftPoint) }) {
|
||||
screenFrame = frame
|
||||
break
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public class ctlCandidateIMK: IMKCandidates, ctlCandidateProtocol {
|
|||
let windowSize = candidateFrame().size
|
||||
var delta = heightDelta
|
||||
var screenFrame = NSScreen.main?.visibleFrame ?? NSRect.seniorTheBeast
|
||||
for frame in NSScreen.screens.map(\.visibleFrame).filter({ !$0.contains(windowTopLeftPoint) }) {
|
||||
for frame in NSScreen.screens.map(\.visibleFrame).filter({ $0.contains(windowTopLeftPoint) }) {
|
||||
screenFrame = frame
|
||||
break
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ public class ctlPopupCompositionBuffer: NSWindowController {
|
|||
|
||||
var adjustedPoint = windowOrigin
|
||||
var screenFrame = NSScreen.main?.visibleFrame ?? NSRect.seniorTheBeast
|
||||
for frame in NSScreen.screens.map(\.visibleFrame).filter({ !$0.contains(windowOrigin) }) {
|
||||
for frame in NSScreen.screens.map(\.visibleFrame).filter({ $0.contains(windowOrigin) }) {
|
||||
screenFrame = frame
|
||||
break
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ public class ctlTooltip: NSWindowController {
|
|||
var adjustedPoint = windowTopLeftPoint
|
||||
var delta = heightDelta
|
||||
var screenFrame = NSScreen.main?.visibleFrame ?? NSRect.seniorTheBeast
|
||||
for frame in NSScreen.screens.map(\.visibleFrame).filter({ !$0.contains(windowTopLeftPoint) }) {
|
||||
for frame in NSScreen.screens.map(\.visibleFrame).filter({ $0.contains(windowTopLeftPoint) }) {
|
||||
screenFrame = frame
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue