Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions azooKeyMac/Windows/PromptInput/PromptInputWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ final class PromptInputWindow: NSWindow {
private var applyCallback: ((String) -> Void)?
private var isTextFieldCurrentlyFocused: Bool = false
private var initialPrompt: String?
private var previousApp: NSRunningApplication?

init() {
super.init(
Expand Down Expand Up @@ -92,12 +91,6 @@ final class PromptInputWindow: NSWindow {
self.applyCallback = onApply
self.completion = completion
self.initialPrompt = initialPrompt
let frontmostApp = NSWorkspace.shared.frontmostApplication
if let frontmostApp, frontmostApp.processIdentifier != NSRunningApplication.current.processIdentifier {
self.previousApp = frontmostApp
} else {
self.previousApp = nil
}

// Reset the window display state
resetWindowState()
Expand Down Expand Up @@ -168,18 +161,6 @@ final class PromptInputWindow: NSWindow {
}

override func close() {
// Call completion handler to reset flags before closing
if let completion = self.completion {
completion(nil)
}

// Restore focus to the previous application
if let previousApp = self.previousApp {
DispatchQueue.main.async {
previousApp.activate(options: [])
}
}

super.close()
self.completion = nil
self.previewCallback = nil
Expand Down
Loading