fix: closing fullscreen window would glitch it (closes #5029)
This commit is contained in:
1 parent
168995493f
commit
ee436cc7cc
1 file changed
+11
-3
+11
-3
@@ -121,9 +121,17 @@ class Window {
|
||||
guard let self else { return }
|
||||
if self.isFullscreen {
|
||||
try? self.axUiElement!.setAttribute(kAXFullscreenAttribute, false)
|
||||
}
|
||||
if let closeButton_ = try? self.axUiElement!.closeButton() {
|
||||
try? closeButton_.performAction(kAXPressAction)
|
||||
// minimizing is ignored if sent immediatly; we wait for the de-fullscreen animation to be over
|
||||
BackgroundWork.accessibilityCommandsQueue.addOperationAfter(deadline: .now() + .seconds(1)) { [weak self] in
|
||||
guard let self else { return }
|
||||
if let closeButton_ = try? self.axUiElement!.closeButton() {
|
||||
try? closeButton_.performAction(kAXPressAction)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if let closeButton_ = try? self.axUiElement!.closeButton() {
|
||||
try? closeButton_.performAction(kAXPressAction)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user