Skip to content

Commit

Permalink
Fix issue with the app blocking access to the desktop
Browse files Browse the repository at this point in the history
It seems like the native SwiftUI window is there even if not shown and somehow it sometimes consumes the mouse events.

Fixes #10
  • Loading branch information
sindresorhus committed May 15, 2021
1 parent 2c32d93 commit 00e89c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Color Picker/AppState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ final class AppState: ObservableObject {
)

DispatchQueue.main.async { [self] in
// Make the invisible native SwitUI window not block access to the desktop.
NSApp.windows.first?.ignoresMouseEvents = true

setUpEvents()
showWelcomeScreenIfNeeded()
}
Expand Down

0 comments on commit 00e89c3

Please sign in to comment.