mirror of
https://github.com/lwouis/alt-tab-macos.git
synced 2026-05-24 11:20:36 +00:00
fix: parallels windows wouldn't switch sometimes (closes #1213)
This commit is contained in:
@@ -158,10 +158,8 @@ class Window {
|
||||
// You can reproduce this buggy behaviour by clicking on the dock icon, proving it's an OS bug
|
||||
BackgroundWork.accessibilityCommandsQueue.asyncWithCap { [weak self] in
|
||||
guard let self = self else { return }
|
||||
var elementConnection = UInt32(0)
|
||||
CGSGetWindowOwner(cgsMainConnectionId, self.cgWindowId, &elementConnection)
|
||||
var psn = ProcessSerialNumber()
|
||||
CGSGetConnectionPSN(elementConnection, &psn)
|
||||
GetProcessForPID(self.application.pid, &psn)
|
||||
_SLPSSetFrontProcessWithOptions(&psn, self.cgWindowId, .userGenerated)
|
||||
self.makeKeyWindow(psn)
|
||||
self.axUiElement.focusWindow()
|
||||
|
||||
Reference in New Issue
Block a user