INNER CODE UNIT · Swift

initializeChangeScreenParametersObserver

mjrusso/scoot · Scoot/AppDelegate.swift:191

    func initializeChangeScreenParametersObserver() {
        NotificationCenter.default.addObserver(
            forName: NSApplication.didChangeScreenParametersNotification,
            object: NSApplication.shared,
            queue: OperationQueue.main
        ) { [weak self] notification in

            OSLog.main.log("Received event: didChangeScreenParametersNotification.")

            guard let self = self else {
                return
            }

            OSLog.main.logDetailsForAllConnectedScreens()

            // For simplicity (and instead of diffing the current window state),
            // always rebuild all jump windows.
            self.rebuildJumpWindows()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…