#include "xinerama.h"
#define TSTAMP_N_SECS(n) (n * 1.0)
+#define TSTAMP_N_MINS(n) (60 * TSTAMP_N_SECS(n))
#define START_TIMER(timer_obj, timeout, callback) \
timer_obj = start_timer(timer_obj, timeout, callback)
#define STOP_TIMER(timer_obj) \
static struct ev_timer *clear_pam_wrong_timeout;
static struct ev_timer *clear_indicator_timeout;
static struct ev_timer *dpms_timeout;
+static struct ev_timer *discard_passwd_timeout;
extern unlock_state_t unlock_state;
extern pam_state_t pam_state;
STOP_TIMER(dpms_timeout);
}
+static void discard_passwd_cb(EV_P_ ev_timer *w, int revents) {
+ clear_input();
+ turn_monitors_off();
+ STOP_TIMER(discard_passwd_timeout);
+}
+
static void input_done(void) {
if (clear_pam_wrong_timeout) {
ev_timer_stop(main_loop, clear_pam_wrong_timeout);
}
STOP_TIMER(clear_indicator_timeout);
+ START_TIMER(discard_passwd_timeout, TSTAMP_N_MINS(3), discard_passwd_cb);
}
/*