godbout / Wooshy.docs

it's like Alfred but for the UI
https://wooshy.app
221 stars 0 forks source link

Does not work in Spotify fullscreen #102

Closed Soft-Bred closed 1 year ago

Soft-Bred commented 1 year ago

Video: https://user-images.githubusercontent.com/60551230/209305565-c03322ab-3e63-40b6-b471-2962cb85c261.mp4

godbout commented 1 year ago

you really have weird bugs lol:

https://user-images.githubusercontent.com/121373/209312674-d4d21337-29be-4144-9424-842206ecca08.mp4

works totally fine here.

if no Target shows up, that may mean that Spotify is not the frontmost app, even if it appears to be so. i'm having the same issue when i plug an external screen, and move Spaces. some background apps that draw invisible windows actually take over when changing Space (that includes setting an app fullscreen) and those apps end up being the real frontmost apps. this is shit. contacted the developers which apps it happen (like Yoink!) but it may be more of a macOS bug.

the way to check if this is the case for you: after you switch Spotify into fullscreen, press command , to show the Preferences window. you'll then see which app has focus, depending on which Preferences window shows up. lemme know.

Soft-Bred commented 1 year ago

Hmm, it might be due to external screens. Though after using the cmd+, command, the settings that opens up is Spotify's.

I tried dragging the Spotify window to my main laptop screen, same issue, only breaks in fullscreen.

Note, the inspector works in fullscreen: 001060 001061

godbout commented 1 year ago

Hmm, it might be due to external screens. Though after using the cmd+, command, the settings that opens up is Spotify's.

ok. i'll have a look by plugging in an iPad as secondary screen (traveling now).

I tried dragging the Spotify window to my main laptop screen, same issue, only breaks in fullscreen.

yeah, i don't think it's a multiple screen issue per se. multiple monitors setups are explicitly handled by Wooshy. but Spotify itself is a special beast. there's code to especially handled that app, because it doesn't respond properly to the normal AX Attributes. something may go wrong or may not be possible with Spotify, because of the way they're building their stuff. but i'll research.

Note, the inspector works in fullscreen: 001060 001061

actually The Inspector can't even get the proper data it seems. video upcoming.

Soft-Bred commented 1 year ago

I also think its best to note, i am using https://spicetify.app/ on top of Spotify, but i doubt that's an issue.

godbout commented 1 year ago

Uploading ScreenFlow.mp4…

The Inspector is using a function provided by the macOS AX APIs that returns the AX UI Element that is under the cursor. it's not rocket science. in the case of Spotify, mostly the "element" returned is a big image. this is mostly due to how they built their app (Electron shit are just doing whatever the fuck they want, without any respect for standards or accessibility). so yeah, something is gonna be tricky here. will investigate more but not sure we can do anything, except contacting (again) the Spotify devs.

godbout commented 1 year ago

I also think its best to note, i am using https://spicetify.app/ on top of Spotify, but i doubt that's an issue.

installed. same thing here. it works. maybe you can have a try without your external monitors?

Soft-Bred commented 1 year ago

maybe you can have a try without your external monitors?

Interesting... 001062

godbout commented 1 year ago

Uploading ScreenFlow.mp4…

The Inspector is using a function provided by the macOS AX APIs that returns the AX UI Element that is under the cursor. it's not rocket science. in the case of Spotify, mostly the "element" returned is a big image. this is mostly due to how they built their app (Electron shit are just doing whatever the fuck they want, without any respect for standards or accessibility). so yeah, something is gonna be tricky here. will investigate more but not sure we can do anything, except contacting (again) the Spotify devs.

the video:

https://user-images.githubusercontent.com/121373/209316065-ce0aa7d4-c2f2-4e53-b06f-a7024b0eafa2.mp4

godbout commented 1 year ago

maybe you can have a try without your external monitors?

Interesting... 001062

welcome to the world of the macOS AX API...

i'll check if i can reproduce with an external mon. and i'll check with other tools like Vimac/Homerow/Shortcat. but most probably there's an AX problem with Spotify when it's in fullscreen and external monitors are used.

if you're in a hurry, could be interesting to see also which option you have in the macOS Settings about multiple monitors using same Space or not, and switching that setting and see if it changes anything (but you'll need to log out).

Soft-Bred commented 1 year ago

Ill test this more after work, currently... working 🙃

godbout commented 1 year ago

ok so i've checked with Spotify on a secondary monitor in fullscreen and yeah, i can confirm, no Target is showing up. actually i've tried with other apps, and same thing. (😭️) but you can still actually filter, and click. but the Target rendering has a bug. so that's a good thing, because this is most probably solvable. thanks for reporting! will work on that.

godbout commented 1 year ago

confirmed. the canvas is drawn on the wrong screen. so even tho you can reach Elements, the drawing doesn't show up. will fix this ASAP. if things go well, should be fixed for Wooshy 5, that i will release in a few days.

godbout commented 1 year ago

was due to two things: 1. a bug in macOS APIs 2. me not using my own wrappers around the bug for that specific case.

macOS has an API that returns the main screen which should give you the screen that currently has focus. in some specific cases the API just returns the wrong screen (like in fullscreen apps on secondary monitors). i've build a whole package wrapping all the bugs around the Display World of macOS, but when drawing the canvas where the Targets are displayed, i've skipped this. so the canvas would be laid on the wrong screen, and the Targets would be drawn in the wild, with nothing to support them. this is fixed now and will be available in Wooshy 5. most probably released in a few days. thanks for the report and helping making Wooshy better!

godbout commented 1 year ago

fixed in v5: https://github.com/godbout/Wooshy.docs/releases/tag/5

if you still see issues, please reopen.