mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Add Click Monitor for ensuring consistent open on click
This commit is contained in:
parent
311e2551c5
commit
72d101b1be
3 changed files with 90 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue