EAPI int
e_desklock_show_autolocked(void)
{
- _e_desklock_autolock_time = ecore_loop_time_get();
+ if (_e_desklock_autolock_time < 1.0)
+ _e_desklock_autolock_time = ecore_loop_time_get();
return e_desklock_show();
}
idle = ecore_x_screensaver_idle_time_get();
max = e_config->desklock_autolock_idle_timeout;
if (_e_desklock_ask_presentation_count > 0)
- max *= _e_desklock_ask_presentation_count;
+ max *= (1 + _e_desklock_ask_presentation_count);
/* If we have exceeded our idle time... */
if (idle >= max)
}
static void
+_e_desklock_ask_presentation_key_down(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event)
+{
+ Evas_Event_Key_Down *ev = event;
+ E_Dialog *dia = data;
+
+ if (strcmp(ev->keyname, "Return") == 0)
+ _e_desklock_ask_presentation_yes(NULL, dia);
+ else if (strcmp(ev->keyname, "Escape") == 0)
+ _e_desklock_ask_presentation_no(NULL, dia);
+}
+
+static void
_e_desklock_ask_presentation_mode(void)
{
E_Manager *man;
e_win_centered_set(dia->win, 1);
e_dialog_show(dia);
+ evas_object_event_callback_add
+ (dia->bg_object, EVAS_CALLBACK_KEY_DOWN,
+ _e_desklock_ask_presentation_key_down, dia);
+
_e_desklock_ask_presentation_dia = dia;
}
int timeout, interval, blanking, expose;
_e_screensaver_ask_presentation_count++;
- timeout = e_config->screensaver_timeout * _e_screensaver_ask_presentation_count;
+ timeout = e_config->screensaver_timeout * (1 + _e_screensaver_ask_presentation_count);
interval = e_config->screensaver_interval;
blanking = e_config->screensaver_blanking;
expose = e_config->screensaver_expose;
}
static void
+_e_screensaver_ask_presentation_key_down(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event)
+{
+ Evas_Event_Key_Down *ev = event;
+ E_Dialog *dia = data;
+
+ if (strcmp(ev->keyname, "Return") == 0)
+ _e_screensaver_ask_presentation_yes(NULL, dia);
+ else if (strcmp(ev->keyname, "Escape") == 0)
+ _e_screensaver_ask_presentation_no(NULL, dia);
+}
+
+static void
_e_screensaver_ask_presentation_mode(void)
{
E_Manager *man;
e_win_centered_set(dia->win, 1);
e_dialog_show(dia);
+ evas_object_event_callback_add
+ (dia->bg_object, EVAS_CALLBACK_KEY_DOWN,
+ _e_screensaver_ask_presentation_key_down, dia);
+
_e_screensaver_ask_presentation_dia = dia;
}