diff --git a/checkin_notes b/checkin_notes index 3a49d39610..74c9f41df4 100644 --- a/checkin_notes +++ b/checkin_notes @@ -12604,3 +12604,13 @@ David 30 Dec 2007 pm.php tools/ make_project + +David 30 Dec 2007 + - Partly fix keyboard detection on Linux. + With this change, we detect opening a terminal + or typing into a terminal; + we don't detect typing into other applications. + (from Frank Thomas). Partly fixes #463 + + client/ + hostinfo_unix.C diff --git a/client/hostinfo_unix.C b/client/hostinfo_unix.C index 664f5e796e..fb926c47d0 100644 --- a/client/hostinfo_unix.C +++ b/client/hostinfo_unix.C @@ -965,12 +965,15 @@ bool HOST_INFO::users_idle(bool check_all_logins, double idle_time_to_run) { time_t idle_time = time(0) - (long) (60 * idle_time_to_run); #ifdef HAVE_UTMP_H - if (check_all_logins) { + if (!check_all_logins) { if (!all_logins_idle(idle_time)) return false; } #endif if (!all_tty_idle(idle_time, "/dev/tty1", '1', 7)) return false; + + // According to Frank Thomas (#463) the following may be pointless + // if (!device_idle(idle_time, "/dev/mouse")) return false; // solaris, linux if (!device_idle(idle_time, "/dev/kbd")) return false;