Add Click Monitor for ensuring consistent open on click

This commit is contained in:
Hariharan Mudaliar 2026-02-16 15:00:03 +05:30
commit 72d101b1be
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
3 changed files with 90 additions and 6 deletions

View file

@ -79,6 +79,12 @@ struct DynamicNotchApp: App {
}
}
final class FirstMouseHostingView<Content: View>: NSHostingView<Content> {
override func acceptsFirstMouse(for event: NSEvent?) -> Bool {
true
}
}
extension AppDelegate {
static var shared: AppDelegate? {
NSApplication.shared.delegate as? AppDelegate
@ -223,7 +229,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
window.animationBehavior = .none
window.contentView = NSHostingView(
window.contentView = FirstMouseHostingView(
rootView: ContentView()
.environmentObject(viewModel)
.environmentObject(webcamManager)