fix: window name would sometimes be empty (closes #4350)

This commit is contained in:
lwouis committed 2025-04-01 10:43:24 +02:00
1 parent 9d852eee9c
commit 911c3c17c5
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ class Window {
init(_ application: Application) {
self.application = application
title = application.localizedName
title = bestEffortTitle(nil)
Window.globalCreationCounter += 1
creationOrder = Window.globalCreationCounter
Logger.debug(title ?? "nil", application.bundleIdentifier ?? "nil")
+1 -1
View File
@@ -186,7 +186,7 @@ func updateWindowSizeAndPositionAndFullscreen(_ element: AXUIElement, _ wid: CGW
let position = try element.position()
DispatchQueue.main.async {
if let window = (window != nil ? window : (Windows.list.first { $0.isEqualRobust(element, wid) })) {
window.title = title
window.title = window.bestEffortTitle(title)
window.size = size
window.position = position
window.isMinimized = isMinimized