kit icon indicating copy to clipboard operation
kit copied to clipboard

MacOS Sonoma: setActiveAppBounds targets the Kit.app prompt

Open ryanomackey opened this issue 2 years ago • 2 comments

Hi 👋

First off, love this project. Post Sonoma upgrade though, it looks like setActiveAppBounds is seeing Kit as the "frontmost" app here:

https://github.com/johnlindquist/kit/blob/1827ac44a6ae33f771348bae144b4f38dfe97152/src/lib/desktop.ts#L314

Was able to get around it by adding this to my script before calling setActiveAppBounds:

await applescript(`
  tell application "System Events"
    tell process "Kit" to set its visible to false
  end tell
`);

setActiveAppBounds({ top, left, right, bottom })

Not sure if it would make sense to add that to setActiveAppBounds's script or not. Maybe there's a better way to grab the second frontmost process? AppleScript scares me.

ryanomackey avatar Sep 29 '23 16:09 ryanomackey

Thanks @ryanomackey . I'm working on a new custom window type for Script Kit that can better handle window focus/spaces/etc. Hopefully I can tackle this as well.

johnlindquist avatar Oct 09 '23 21:10 johnlindquist

Has this been addressed already @johnlindquist ?

JosXa avatar May 25 '24 14:05 JosXa