fix: window name would sometimes be empty (closes #4350)
This commit is contained in:
1 parent
9d852eee9c
commit
911c3c17c5
2 files changed
+2
-2
No files matched your search
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user