The quartz (macOS) adjustment method incorrectly used the display
index instead of the associated CGDirectDisplayID. Incidentally this
happened to work too but was incorrect.
Rearrange checks and verbose output in main() to bring back checks
that were accidentally left out when time-based adjustments were
enabled. This includes the output indicating the daytime/night
temperatures and the check that the temperatures are valid.
Allow setting the time of the dawn and dusk transition periods
directly in the configuration file. If these are specified, the
location provider is not needed and is therefore not initialized.
Based on patch by Martin Nicolay <edelschimmel1@gmx.de>.
We have to retry SetDeviceGammaRamp a few times before giving up
because some buggy drivers fail on the first invocation just to
succeed on the second.
Simplify implementation of fades in continual mode. A fade is now
applied anytime the change in color temperature, brightness or
gamma is greater than a preset threshold. This means that a fade
is applied if the location provider suddenly updates to a new
location or if the currently time suddenly jumps e.g. after waking
up the computer from sleep. An easing function is applied to the
fade to make it more pleasant.
Use the term "fade" instead of "transition" for the short (~5s)
fade between color temperatures. The term "transition" is now only
used for the transition phase between daytime and night.
The setting "transition" in the configuration file is now deprecated
and "fade" should be used instead.
Add pipeutils.c with utility functions for working with pipes as
signals across threads. Using pipes for signals makes it easy for
the main thread to wait on (multiple) file descriptors with or
without a timeout.
Change location provider implementations so it is possible for
location providers to dynamically update the location. This
commit adds the interfaces and infrastructure in redshift.c
but none of the location provides are changed to become dynamic.