aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bin/e_config.c1
-rw-r--r--src/bin/e_config.h1
-rw-r--r--src/bin/e_screensaver.c7
-rw-r--r--src/modules/conf_display/e_int_config_screensaver.c12
4 files changed, 19 insertions, 2 deletions
diff --git a/src/bin/e_config.c b/src/bin/e_config.c
index 7c2579489..0be0d7795 100644
--- a/src/bin/e_config.c
+++ b/src/bin/e_config.c
@@ -626,6 +626,7 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, suspend_connected_standby, UCHAR);
E_CONFIG_VAL(D, T, screensaver_suspend, UCHAR);
+ E_CONFIG_VAL(D, T, screensaver_hibernate, UCHAR);
E_CONFIG_VAL(D, T, screensaver_suspend_on_ac, UCHAR);
E_CONFIG_VAL(D, T, screensaver_suspend_delay, DOUBLE);
diff --git a/src/bin/e_config.h b/src/bin/e_config.h
index 500a20f08..565b8abf2 100644
--- a/src/bin/e_config.h
+++ b/src/bin/e_config.h
@@ -230,6 +230,7 @@ struct _E_Config
unsigned char suspend_connected_standby; // GUI
unsigned char screensaver_suspend; // GUI
+ unsigned char screensaver_hibernate; // GUI
unsigned char screensaver_suspend_on_ac; // GUI
double screensaver_suspend_delay; // GUI
diff --git a/src/bin/e_screensaver.c b/src/bin/e_screensaver.c
index ef313c562..a93105b7b 100644
--- a/src/bin/e_screensaver.c
+++ b/src/bin/e_screensaver.c
@@ -278,7 +278,12 @@ _e_screensaver_suspend_cb(void *data EINA_UNUSED)
{
if ((e_config->screensaver_suspend_on_ac) ||
(e_powersave_mode_get() > E_POWERSAVE_MODE_LOW))
- e_sys_action_do(E_SYS_SUSPEND, NULL);
+ {
+ if (e_config->screensaver_hibernate)
+ e_sys_action_do(E_SYS_HIBERNATE, NULL);
+ else
+ e_sys_action_do(E_SYS_SUSPEND, NULL);
+ }
}
return EINA_FALSE;
}
diff --git a/src/modules/conf_display/e_int_config_screensaver.c b/src/modules/conf_display/e_int_config_screensaver.c
index bcd816793..ed94ccb12 100644
--- a/src/modules/conf_display/e_int_config_screensaver.c
+++ b/src/modules/conf_display/e_int_config_screensaver.c
@@ -26,6 +26,7 @@ struct _E_Config_Dialog_Data
double ask_presentation_timeout;
int screensaver_suspend;
+ int screensaver_hibernate;
int screensaver_suspend_on_ac;
double screensaver_suspend_delay_seconds;
double screensaver_suspend_delay_minutes;
@@ -75,6 +76,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->ask_presentation = e_config->screensaver_ask_presentation;
cfdata->ask_presentation_timeout = e_config->screensaver_ask_presentation_timeout;
cfdata->screensaver_suspend = e_config->screensaver_suspend;
+ cfdata->screensaver_hibernate = e_config->screensaver_hibernate;
cfdata->screensaver_suspend_on_ac = e_config->screensaver_suspend_on_ac;
cfdata->screensaver_suspend_delay_seconds = (int)e_config->screensaver_suspend_delay % 60;
cfdata->screensaver_suspend_delay_minutes = ((int)e_config->screensaver_suspend_delay % 3600) / 60;
@@ -112,6 +114,7 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
e_config->screensaver_ask_presentation = cfdata->ask_presentation;
e_config->screensaver_ask_presentation_timeout = cfdata->ask_presentation_timeout;
e_config->screensaver_suspend = cfdata->screensaver_suspend;
+ e_config->screensaver_hibernate = cfdata->screensaver_hibernate;
e_config->screensaver_suspend_on_ac = cfdata->screensaver_suspend_on_ac;
e_config->screensaver_suspend_delay =
(cfdata->screensaver_suspend_delay_seconds
@@ -173,6 +176,7 @@ _basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfd
(e_config->screensaver_ask_presentation != cfdata->ask_presentation) ||
(!EINA_DBL_EQ(e_config->screensaver_ask_presentation_timeout, cfdata->ask_presentation_timeout)) ||
(e_config->screensaver_suspend != cfdata->screensaver_suspend) ||
+ (e_config->screensaver_hibernate != cfdata->screensaver_hibernate) ||
(e_config->screensaver_suspend_on_ac != cfdata->screensaver_suspend_on_ac) ||
(!EINA_DBL_EQ(e_config->screensaver_suspend_delay, screensaver_suspend_delay)) ||
(e_config->screensaver_wake_on_notify != cfdata->wake_on_notify) ||
@@ -222,6 +226,12 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
&(cfdata->screensaver_suspend_on_ac));
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
+
+ ow = e_widget_check_add(evas, _("Hibernate instead of suspend"),
+ &(cfdata->screensaver_hibernate));
+ e_widget_check_widget_disable_on_unchecked_add(oc, ow);
+ e_widget_list_object_append(ol, ow, 1, 1, 0.5);
+
ow = e_widget_label_add(evas, _("Suspend delay"));
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
@@ -239,7 +249,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
cfdata->gui.slider_suspend_seconds = ow;
-
+
oc = e_widget_check_add(evas, _("Disable blanking for Fullscreen Windows"),
&(cfdata->no_dpms_on_fullscreen));
e_widget_list_object_append(ol, oc, 1, 1, 0.5);