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
objc2project 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-lightto reduce the amount of complexunsafecode, as well as making it easier for you to in the future changesubscribeto listen for theme change notifications instead of the busy loop.