INNER CODE UNIT · Swift

bringToForeground

mjrusso/scoot · Scoot/AppDelegate.swift:295

    func bringToForeground() {
        self.currentApp = NSWorkspace.shared.frontmostApplication

        OSLog.main.log("Scoot invoked with frontmost app: \(String(describing: self.currentApp?.localizedName ?? "<unknown>"), privacy: .private(mask: .hash))")

        let activeJumpMode = self.inputWindow.activeJumpMode

        if let app = self.currentApp , activeJumpMode == .element {
            // For performance reasons, only traverse the accessibility tree if
            // the user is actually using the element-based navigation mode.
            // See https://github.com/mjrusso/scoot/issues/26 for more details.
            self.inputWindow.initializeCoreDataStructuresForElementBasedMovement(of: app)
        }

        OSLog.main.log("Using \(String(describing: activeJumpMode), privacy: .public) jump mode")

        self.inputWindow.showAppropriateJumpView()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…