You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've been using active-win for a year now and can navigate around tricky subjects like the permissions-business, so I'm not new to the library. Lately I've discovered something awkward that my non-swift brain cannot wrap its head around:
When using Adobe Products like Illustrator or InDesign and editing a document, more often than not the window title is returned empty:
{title: '',// <- this should yield something like "Acme-Illustrations.indd* @ 46,12 % (RGB/Preview)"id: 292,owner: {path: '/Applications/Adobe InDesign 2023/Adobe InDesign 2023.app',name: 'InDesign',bundleId: 'com.adobe.InDesign',processId: 1597},bounds: {x: 2044,y: 293,height: 527,width: 308},memoryUsage: 2288,platform: 'macos'}
Things I researched so far:
permissions are properly set up (both accessibility and screen recording are enabled for the app)
I am fully aware that sometimes eg. when editing a color swatch in InDesign, InDesign opens a temporary window "Colour Swatches", interestingly these are seemingly always caught just fine. I'm primarly talking about the regular editing of files, what a user will be doing ~90% of the time
If I understand correctly, cases like transparent windows and tiny windows would return null altogether instead of an empty title string, right? So it shouldn't be any of those cases
So after all I'm assuming those are cases where kCGWindowName is simply empty? Is there a simple way for me to confirm that?
My go-to method of checking the title of a window is by going into mac Mission Control and hovering the window; interestingly I can always see the regular title of the adobe products in mission control, so I don't really think their window titles are empty, so they must be doing some weird window shenanigans?
I'm investigating further and will report any findings in here.
The text was updated successfully, but these errors were encountered:
So I was able to narrow it down. I wrote a super quick script that rewrites the last stdout line to process.stdout.write(`${window.title} - ${window.owner.name}`)
This way I could navigate around see live updates to what active-win is seeing. Unfortunately it seems that almost any action in Illustrator causes their window to have an empty title.
Here's the default view (you can see the correct title at the bottom of the adobe window):
But when you open any dropdown field like stroke or fonts it suddenly becomes empty:
Same when eg. just opening a toolbar:
Or even simpler – just a context menu:
Is there anything we can do about this or are our hands tied since Adobe doesn't return anything here?
Ok, so after all it just simply seems that all those interactions technically launch sort of mini windows that obviously take the first space in the open-window-stack. Since they are launched from the "correct" window I can use activeWindow.getOpenWindows() and if the first entry is one of those empty title shenanigans I can take the second entry and if the app name matches and has a window title, I can use that one. Sounds a bit flaky, so I will run some tests, but I guess its sort of a valid way to go about it.
Since it's not really an error on active-wins end, but rather an inconvenience by adobe, feel free to close this issue.
So I've been using active-win for a year now and can navigate around tricky subjects like the permissions-business, so I'm not new to the library. Lately I've discovered something awkward that my non-swift brain cannot wrap its head around:
When using Adobe Products like Illustrator or InDesign and editing a document, more often than not the window title is returned empty:
Things I researched so far:
disableScreenRecordingPermission
in https://github.com/sindresorhus/active-win/blob/27221e5da0a64025bdec8759605694ea84ff9f68/Sources/ActiveWinCLI/main.swift#LL49C20-L49C52 since it reports other apps just fine (eg. Figma)kCGWindowName
is simply empty? Is there a simple way for me to confirm that?I'm investigating further and will report any findings in here.
The text was updated successfully, but these errors were encountered: