-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use objc2-foundation
and objc2-app-kit
#37
Conversation
How would this upgrade enable that specifically? |
There's two ways to listen for changes to the appearance that I know of:
Using these are possible without |
This PR also fixes a memory leak in |
I don't know enough about Objective C to review the code, but since two users report this fixes a real world issue in squidowl/halloy#598 and nobody has stepped up to review this in 6 months, I'll go ahead and merge this. Thanks for the fix. |
Just to be explicitly clear, can someone confirm the notify example is now working on the main branch on macOS? I want to be sure of that before the next release and I don't have a Mac to test. |
A PR for this would be welcome! |
I doubt it is, this PR doesn't actually fix that.
I've written down some notes in #47, but I suspect the problem to be more fundamentally that Rust's |
I tested this on macOS and it still does not work. Also, as mentioned by @madsmtm it is extremely inefficient. |
The
objc2
project is the successor toobjc
, and contains automatically generated bindings to the Foundation and AppKit frameworks (and many other frameworks), while ensuring that memory management rules are upheld.This allows
dark-light
to reduce the amount of complexunsafe
code, as well as making it easier for you to in the future changesubscribe
to listen for theme change notifications instead of the busy loop.