summaryrefslogtreecommitdiff
path: root/src/gpm-common.h
diff options
context:
space:
mode:
authorFabio Erculiani <[email protected]>2013-07-04 23:11:54 +0200
committerFabio Erculiani <[email protected]>2013-07-05 12:49:56 +0200
commitb36c93575f88bd5a045c36f3d8084608ae20879f (patch)
tree3165189b3184ab2e0fb12eb033eb2df04b071379 /src/gpm-common.h
parent4d842135ce677957aee8bd5bb47f875b0ece570a (diff)
downloadmate-power-manager-b36c93575f88bd5a045c36f3d8084608ae20879f.tar.bz2
mate-power-manager-b36c93575f88bd5a045c36f3d8084608ae20879f.tar.xz
drop --with-systemdsleep and move logind detection to runtime
There is no need to bind the user to either systemd-logind or upower at build time. People can switch between init systems or run logind without systemd.
Diffstat (limited to 'src/gpm-common.h')
-rw-r--r--src/gpm-common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpm-common.h b/src/gpm-common.h
index ca4762c..6f712cb 100644
--- a/src/gpm-common.h
+++ b/src/gpm-common.h
@@ -24,8 +24,12 @@
#include <glib.h>
+#include <unistd.h>
+
G_BEGIN_DECLS
+#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0)
+
#define GPM_DBUS_SERVICE "org.mate.PowerManager"
#define GPM_DBUS_INTERFACE "org.mate.PowerManager"
#define GPM_DBUS_INTERFACE_BACKLIGHT "org.mate.PowerManager.Backlight"