X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Ftimers.c;h=d36ff701f948a6045102dbe389d5be54a83f7a21;hb=e4fa2ac140f7bc56571373a7b7eb585fa4500e38;hp=4b5b570f31abe9104dc562e37cd301fc663a24ed;hpb=6cee540bdbb571485cd5e519f89f389faebd0495;p=xscreensaver diff --git a/driver/timers.c b/driver/timers.c index 4b5b570f..d36ff701 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -339,6 +339,8 @@ check_pointer_timer (XtPointer closure, XtIntervalId *id) int root_x, root_y, x, y; unsigned int mask; + if (!ssi->real_screen_p) continue; + if (!XQueryPointer (si->dpy, ssi->screensaver_window, &root, &child, &root_x, &root_y, &x, &y, &mask)) { @@ -1074,7 +1076,20 @@ proc_interrupts_activity_p (saver_info *si) while (fgets (new_line, sizeof(new_line)-1, f1)) { - if (!checked_kbd && strstr (new_line, "keyboard")) + if (strchr (new_line, ',')) + { + /* Ignore any line that has a comma on it: this is because + a setup like this: + + 12: 930935 XT-PIC usb-uhci, PS/2 Mouse + + is really bad news. It *looks* like we can note mouse + activity from that line, but really, that interrupt gets + fired any time any USB device has activity! So we have + to ignore any shared IRQs. + */ + } + else if (!checked_kbd && strstr (new_line, "keyboard")) { kbd_changed = (*last_kbd_line && !!strcmp (new_line, last_kbd_line)); strcpy (last_kbd_line, new_line);