Created attachment 5724 Add CK2 support ConsoleKit2 is a fork of ConsoleKit. This patch uses the suspend/hibernate APIs from it. This patch also cleans up the code a little, but not as much as I'd like. In the future, we should be able to clean up this more as CK2 provides the suspend, hibernate, shutdown, and restart calls the same way logind does. So if CK2 does get adopted by the distros then it's just a different dbus path. Additionally, the upower code can be dropped once 0.99.0+ is standard everywhere as xfsm doesn't use upower for anything else.
Pushed to master for additional testing: commit 2cd4ba484bfec3354a2bbc58f94e93f874757f1e Author: Eric Koegel <eric.koegel@gmail.com> Date: Mon Nov 3 07:45:36 2014 +0300 Add ConsoleKit2 support This patch: - Moves the shutdown fallback code into its own files - Adds support for ConsoleKit2 - Simplifies the upower version check to one spot. To do that, every shutdown backend has its own lock screen function. Now, either logind or consolekit may be !NULL and upower will only be !NULL when using versions prior to 0.99.0. It will attempt to use logind first, upower second, consolekit third, and finally the internal fallback code. http://git.xfce.org/xfce/xfce4-session/commit/?id=2cd4ba484bfec3354a2bbc58f94e93f874757f1e