swipe misses focus

This commit is contained in:
Ian Gulliver
2026-10-17 10:06:12 -07:00
parent 7452bd5936
commit d21215b442
3 changed files with 15 additions and 0 deletions
+9
View File
@@ -97,6 +97,7 @@ final class Overlays {
if switcher != nil {
return
}
logFocus("open switcher")
switcher = SwitcherModel(store: store, overlays: self, anchor: pickerFrame)
}
@@ -183,6 +184,14 @@ final class Overlays {
}
}
@MainActor
func logFocus(_ what: String) {
let key = NSApp.keyWindow
let main = NSApp.mainWindow
let responder = key?.firstResponder.map { String(describing: type(of: $0)) } ?? "nil"
log.notice("focus debug: \(what, privacy: .public) active=\(NSApp.isActive) key=\(key?.title ?? "nil", privacy: .public) main=\(main?.title ?? "nil", privacy: .public) mainIsKey=\(main?.isKeyWindow ?? false) responder=\(responder, privacy: .public)")
}
struct ModalText: View {
let text: String