Email or username:

Password:

Forgot your password?
Gregory

So I made a macOS thing. It's a fidget spinner, but with a twist.

Made possible thanks to @samhenrigold posting about his own experiments with these private APIs.

31 comments
Gos de l'hortolà :estelada:

@grishka
Why not contribute to an open source operating system instead. I mean, you are posting about it on mastodon after all
@samhenrigold @Gargron

Gregory

@pdh_sedlr @samhenrigold I've yet to see an open-source desktop OS that doesn't suck (sorry). I'm not the kind of person who would inconvenience themselves out of principle.

Gos de l'hortolà :estelada:

@grishka
I've yet to see a closed source desktop OS that doesn't suck and I'm not the kind of person who would inconvenience themselves for the benefit of a multinational. To be more precise, investing time learning API details of such a framework scores quite low for me. But that's not to say you shouldn't, I was just wondering why.
@samhenrigold

Hakan Bayındır

@grishka @pdh_sedlr @samhenrigold As a user of both Linux and macOS for well over 15 years, I can say that macOS sucks more at the end of the day.

Radu

@grishka @samhenrigold next challenge is to make the center of the fidget spinner stay still while you spin the window 😁

sam henri gold

@grishka @Crates take it a step further, prevent the center from spinning but spin the rest of the screen around it

sam henri gold

@grishka @Crates (this might force you to disable SIP like I had to do today to hook into the global drag and drop manager)

Gregory

@samhenrigold @Crates oh this was me today trying to set up censorship bypass tools on my new router

Ysegrim

@grishka @samhenrigold I feel seen!

:blobfoxlaughsweat:

Thank you!

Gregory

@rmasoni @samhenrigold the private API is CGSSetWindowTransform. It allows you to set an arbitrary affine transform on a window. There's also CGSSetWindowWarp that takes a mesh, this is the one Sam is experimenting with, it's used by the system for that genie animation when you minimize a window.

Rafael Masoni

@grishka @samhenrigold Ooh! That makes sense! Thanks for the explanation.

Tofu :blobcatace:​

@grishka Oh wow it's just like Wayland. How about doing this with X11, and spinning the whole display?

🏳️‍⚧️ LinuxEnjoyer 🐧

@tofu@is-a.cat gahahaga omg thats so good,, i was working on one using xshape but i really want to spin the display now ​:celgrannylaugh:​

Gregory

Now available on Github! And the center part does not rotate. And the momentum now feels more like the real thing.

github.com/grishka/WidgetSpinn

Gregory

While it does run on older macOS versions, it glitches a lot on anything 10.x. Not sure why this happens but it might be related to how the window server draws shadows.

Gregory

Anyway, now that I'm done with this, I'm gonna go back to photo albums in Smithereen :P

AnnoyingRains

@grishka @samhenrigold omfg it's so cursed... I love it

Why does this API even exist? What uses it?

Gregory

@avali @samhenrigold the rotation I'm not sure anything uses (which is why it's glitchy on older OSes), but scaling is used plenty for spaces/expose. The mesh warp is used for the genie animation when minimizing windows and was used for modal sheets in 10.x when the sheet is wider than its parent window.

Theo Paris

@grishka @samhenrigold This is so cool! I didn't even realize this was possible until now lol

Go Up