[PATCH] Mac OS X support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Redshift |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
Redshift is awesome and I use it all the time on my personal Debian laptop. I also use a Mac sometimes for work and I wanted it running there.
I've written a patch to add a gamma backend for the Quartz Display Services API, which is attached and also available at
https:/
The patch is against the 1.7 release tarball (I don't have bzr on my Mac). Apart from autotools, it doesn't require anything that's not on a standard Mac system.
The API is documented at
https:/
(see the "Adjusting the Display Gamma" section)
A couple of notes:
- The API seems to reset color configuration when the process exits. This is pretty reasonable, honestly, but it does mean that one-shot mode doesn't work.
- I added a fallback dummy definition of PKG_CHECK_MODULES to configure.ac so that I don't need pkg-config and its aclocal module installed.
- The API takes floats, not uint16_ts. Apparently every other backend wants uint16_t.
- The 0-to-1 ramp does not seem to be the default gamma ramp -- my first attempt made the screen significantly brighter and I think slightly bluer. So I assume that the current gamma ramp corresponds to 6500 K, and multiply the retrieved gamma ramp (instead of a 0-to-1 ramp) by the coefficients provided to me. This seems to be the only way to avoid a discontinuity with the fade-in. I refactored a bit of code in colorramp.c to accomplish this.
- I haven't yet added configuration for multiple monitors or similar.
- I haven't added a menubar icon a la gtk-redshift.
Let me know what you think. I'll add multiple monitor configuration and rebase against bzr sometime soon.
Thanks, I just saw this patch today. Apparently I get no notification from launchpad anymore when bugs are posted. Do you think it would be possible to apply the redshift correction on top of the existing gamma ramps? That might fix the fourth issue you mentioned. Also, I have started moving development to http:// github. com/jonls/ redshift so if you don't mind using git instead of bzr you might want to use that repository.