summaryrefslogtreecommitdiff
path: root/mate-session/gsm-logout-dialog.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2013-09-12 17:42:23 +0200
committerraveit65 <[email protected]>2013-09-12 17:42:23 +0200
commitf0b5b1ab78879d64f80117415aacf029359afea5 (patch)
treef5aad4ebb742f341bf248aa8a1e554cdfd3b7401 /mate-session/gsm-logout-dialog.c
parentf37bbe895ebe09cfa468884973aca490e7a6785e (diff)
downloadmate-session-manager-f0b5b1ab78879d64f80117415aacf029359afea5.tar.bz2
mate-session-manager-f0b5b1ab78879d64f80117415aacf029359afea5.tar.xz
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