Don't receive ScreenLayoutChangedEvent events
choco opened this issue · 1 comments
choco commented
Maybe I'm doing something wrong, but I don't receive ScreenLayoutChangedEvent events.
swindler.on { (event: ScreenLayoutChangedEvent) in
print("screen changed")
}
With the above if I change some parameter, for example the resolution, nothing is printed.
If I register manually (which is the same way Swindler does)
NotificationCenter.default.addObserver(forName: NSApplication.didChangeScreenParametersNotification,
object: NSApplication.shared,
queue: OperationQueue.main) {
notification -> Void in
print("screen parameters changed")}
it works.
Oh, and the example app in the project still uses the old API.