X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Ftimers.c;h=4b5b570f31abe9104dc562e37cd301fc663a24ed;hb=6cee540bdbb571485cd5e519f89f389faebd0495;hp=5e73d5b12134823b47769066cf35ce63ab7cd4cc;hpb=cccbddbc4140cf9a06d7d95cc5c0ca36eb5d6e28;p=xscreensaver diff --git a/driver/timers.c b/driver/timers.c index 5e73d5b1..4b5b570f 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -264,8 +264,8 @@ cycle_timer (XtPointer closure, XtIntervalId *id) else { if (p->debug_p) - fprintf (stderr, "%s: not starting cycle_timer: how_long == %d\n", - blurb(), how_long); + fprintf (stderr, "%s: not starting cycle_timer: how_long == %ld\n", + blurb(), (unsigned long) how_long); } } @@ -450,7 +450,7 @@ check_for_clock_skew (saver_info *si) shift > (p->timeout / 1000)) { if (p->verbose_p) - fprintf (stderr, "%s: wall clock has jumped by %d:%02d:%02d!\n", + fprintf (stderr, "%s: wall clock has jumped by %ld:%02ld:%02ld!\n", blurb(), (shift / (60 * 60)), ((shift / 60) % 60), (shift % 60)); @@ -705,8 +705,8 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) if (p->debug_p) { - Window root, window; - int x, y; + Window root=0, window=0; + int x=-1, y=-1; const char *type = 0; if (event.xany.type == MotionNotify) { @@ -738,8 +738,21 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) for (i = 0; i < si->nscreens; i++) if (root == RootWindowOfScreen (si->screens[i].screen)) break; - fprintf (stderr,"%s: %d: %s on 0x%x", + fprintf (stderr,"%s: %d: %s on 0x%lx", blurb(), i, type, (unsigned long) window); + + /* Be careful never to do this unless in -debug mode, as + this could expose characters from the unlock password. */ + if (p->debug_p && event.xany.type == KeyPress) + { + KeySym keysym; + char c = 0; + XLookupString (&event.xkey, &c, 1, &keysym, 0); + fprintf (stderr, " (%s%s)", + (event.xkey.send_event ? "synthetic " : ""), + XKeysymToString (keysym)); + } + if (x == -1) fprintf (stderr, "\n"); else