mirror of
https://github.com/lwouis/alt-tab-macos.git
synced 2026-05-24 11:20:36 +00:00
fix: prevent crash introduced in v6.70.0 (closes #3392)
This commit is contained in:
@@ -79,7 +79,7 @@ class Application: NSObject {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else { return }
|
||||
if let window = (Windows.list.first { $0.isEqualRobust(axWindow, wid) }) {
|
||||
window.title = title
|
||||
window.title = window.bestEffortTitle(title)
|
||||
window.size = size
|
||||
window.isFullscreen = isFullscreen
|
||||
window.isMinimized = isMinimized
|
||||
|
||||
@@ -165,9 +165,8 @@ fileprivate func windowTitleChanged(_ element: AXUIElement, _ pid: pid_t) throws
|
||||
if let wid = try element.cgWindowId() {
|
||||
let newTitle = try element.title()
|
||||
DispatchQueue.main.async {
|
||||
if let window = (Windows.list.first { $0.isEqualRobust(element, wid) }),
|
||||
newTitle != nil && newTitle != window.title {
|
||||
window.title = newTitle!
|
||||
if let window = (Windows.list.first { $0.isEqualRobust(element, wid) }), newTitle != window.title {
|
||||
window.title = window.bestEffortTitle(newTitle)
|
||||
App.app.refreshOpenUi([window])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user