mirror of https://github.com/BOINC/boinc.git
- 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 svn path=/trunk/boinc/; revision=14449
This commit is contained in:
parent
3ce776ba81
commit
7e44643172
|
@ -12604,3 +12604,13 @@ David 30 Dec 2007
|
||||||
pm.php
|
pm.php
|
||||||
tools/
|
tools/
|
||||||
make_project
|
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
|
||||||
|
|
|
@ -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);
|
time_t idle_time = time(0) - (long) (60 * idle_time_to_run);
|
||||||
|
|
||||||
#ifdef HAVE_UTMP_H
|
#ifdef HAVE_UTMP_H
|
||||||
if (check_all_logins) {
|
if (!check_all_logins) {
|
||||||
if (!all_logins_idle(idle_time)) return false;
|
if (!all_logins_idle(idle_time)) return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!all_tty_idle(idle_time, "/dev/tty1", '1', 7)) return false;
|
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;
|
if (!device_idle(idle_time, "/dev/mouse")) return false;
|
||||||
// solaris, linux
|
// solaris, linux
|
||||||
if (!device_idle(idle_time, "/dev/kbd")) return false;
|
if (!device_idle(idle_time, "/dev/kbd")) return false;
|
||||||
|
|
Loading…
Reference in New Issue