summaryrefslogtreecommitdiff
path: root/mate-session/gsm-logout-dialog.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-09-12 10:45:43 -0700
committerStefano Karapetsas <[email protected]>2013-09-12 10:45:43 -0700
commitb53f83e1fcd8929b9e9275eae098308df2ab5906 (patch)
treef5aad4ebb742f341bf248aa8a1e554cdfd3b7401 /mate-session/gsm-logout-dialog.c
parentf37bbe895ebe09cfa468884973aca490e7a6785e (diff)
parentf0b5b1ab78879d64f80117415aacf029359afea5 (diff)
downloadmate-session-manager-b53f83e1fcd8929b9e9275eae098308df2ab5906.tar.bz2
mate-session-manager-b53f83e1fcd8929b9e9275eae098308df2ab5906.tar.xz
Merge pull request #30 from NiceandGently/master
fix systemd-login1 support for hibernate/suspend
Diffstat (limited to 'mate-session/gsm-logout-dialog.c')
-rw-r--r--mate-session/gsm-logout-dialog.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/mate-session/gsm-logout-dialog.c b/mate-session/gsm-logout-dialog.c
index 2d2947c..1a79875 100644
--- a/mate-session/gsm-logout-dialog.c
+++ b/mate-session/gsm-logout-dialog.c
@@ -200,13 +200,29 @@ gsm_logout_dialog_destroy (GsmLogoutDialog *logout_dialog,
static gboolean
gsm_logout_supports_system_suspend (GsmLogoutDialog *logout_dialog)
{
- return up_client_get_can_suspend (logout_dialog->priv->up_client);
+ gboolean ret;
+#ifdef HAVE_SYSTEMD
+ if (LOGIND_RUNNING())
+ ret = gsm_systemd_can_suspend (logout_dialog->priv->systemd);
+ else
+#endif
+ ret = up_client_get_can_suspend (logout_dialog->priv->up_client);
+
+ return ret;
}
static gboolean
gsm_logout_supports_system_hibernate (GsmLogoutDialog *logout_dialog)
{
- return up_client_get_can_hibernate (logout_dialog->priv->up_client);
+ gboolean ret;
+#ifdef HAVE_SYSTEMD
+ if (LOGIND_RUNNING())
+ ret = gsm_systemd_can_hibernate (logout_dialog->priv->systemd);
+ else
+#endif
+ ret = up_client_get_can_hibernate (logout_dialog->priv->up_client);
+
+ return ret;
}
static gboolean