fix: simpler/better window focus
This commit is contained in:
1 parent
65816a270f
commit
574a6401b9
1 file changed
-2
@@ -75,8 +75,6 @@ class Window {
|
|||||||
CGSGetWindowOwner(cgsMainConnectionId, self.cgWindowId, &elementConnection)
|
CGSGetWindowOwner(cgsMainConnectionId, self.cgWindowId, &elementConnection)
|
||||||
var psn = ProcessSerialNumber()
|
var psn = ProcessSerialNumber()
|
||||||
CGSGetConnectionPSN(elementConnection, &psn)
|
CGSGetConnectionPSN(elementConnection, &psn)
|
||||||
AXUIElementPerformAction(self.axUiElement, kAXRaiseAction as CFString)
|
|
||||||
self.makeKeyWindow(psn)
|
|
||||||
_SLPSSetFrontProcessWithOptions(&psn, self.cgWindowId, .userGenerated)
|
_SLPSSetFrontProcessWithOptions(&psn, self.cgWindowId, .userGenerated)
|
||||||
self.makeKeyWindow(psn)
|
self.makeKeyWindow(psn)
|
||||||
AXUIElementPerformAction(self.axUiElement, kAXRaiseAction as CFString)
|
AXUIElementPerformAction(self.axUiElement, kAXRaiseAction as CFString)
|
||||||
|
|||||||
Reference in new issue
Block a user