JohnCoates / Aerial

Apple TV Aerial Screensaver for Mac
MIT License
20.77k stars 1.05k forks source link

VenturaSaver2Cpx: the Ventura Screensaver and Mouse Events bug #1267

Open xmddmx opened 1 year ago

xmddmx commented 1 year ago

Let's take this as given: macOS screensavers should, optionally, be programmed to let users interact with keyboard or mouse while the screensaver is running. I believe "Mowing Man" was one of the first to do this?

What about recent versions of macOS?

In any case, I propose we call this the VenturaSaver2Cpx bug to have a nice search keyword. I don't think it's worth registering a new domain name 😄

There seemed to be no way around this.

Until now.

I belive I have found a workaround for the VenturaSaver2Cpx bug.

The workaround is ugly - basically, you have to trap the mouse cursor, figure out how far it's moving, and if it moves more than 200px, move it back, all the while maintaining a "simulated" cursor position that you forward on to your NSViews.

When you do this, you can have a screensaver which shows an onscreen display (OSD) also called a Heads Up Display (HUD) which allows a user to interact with a running screensaver using mouse or trackpad move / click events.

Would that be of interest to Aerial users?

xmddmx commented 1 year ago

Update: I feel like my workaround is pretty solid on Ventura, allowing you to mouse over the entire screen. However, it only works on 1 monitor - I've not found a way to mouse from one screen to nother w/o causing the screensaver to exit.

glouel commented 1 year ago

Hey @xmddmx

Apologies for not answering earlier, it was a horribly busy week here at work.

Your description of the history of this is super accurate as far as I can tell.

And yes yes yes, your workaround looks super interesting. Having any gesture to go to next video (or maybe even back to previous) is something I'm definitely interested in, so please tell me more. Is it possible to do something with mouse clicks btw ?

In any case, thanks for letting me know about this and yup, definitely interested if I didn't say that enough ;)

xmddmx commented 1 year ago

@glouel I've got a proof-of-concept project based on ScreenSaverMinimal, but I don't think it's really ready for public consumption yet. Is there a way I could send you the XCode project privately for you to hack on ?

glouel commented 1 year ago

Sure thing, send me an email at guillaume @ louel . fr (without the spaces)

xmddmx commented 1 year ago

done! happy to collaborate here or direct via email. once stuff is working a little better I think it should be public...