-
Notifications
You must be signed in to change notification settings - Fork 435
Description
Development on the original Geoclue has stopped and there is still a ton of issues with it (most importantly random segfaults), so it seems reasonable to move to Geoclue2 as soon as possible as future improvements will happen there. (As an example this bug https://bugs.freedesktop.org/show_bug.cgi?id=39234 basically means that the new dbus-service branch of redshift crashes on every startup; it is marked as WONTFIX).
Geoclue2 has no C library interface so it is necessary to go directly through the DBus interface. It seems that the high-level DBus API in Gio (https://developer.gnome.org/gio/stable/) can be used. I don't know if it is worthwhile to set up gdbus-codegen to generate an interface or if it is easier to just instantiate GDBusProxy objects. As with the old Geoclue code I don't think we can easily get location updates without replacing the core of Redshift with a Glib main loop (also worth considering).
Another consideration is whether Geoclue2 is mature enough. I did a quick test to check that it works (Geoclue2-2.0.0 in Fedora) and it seemed to work although the implementation has to be done carefully. One thing in particular is noteworthy: It appears that the location cannot be read before a LocationUpdated
signal is sent. This means that a main loop is needed even for reading the current location, so Geoclue2 support cannot be easily added to the current Redshift implementation.