summaryrefslogtreecommitdiff
path: root/mate-session/gsm-logout-dialog.c
diff options
context:
space:
mode:
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