ftp://ftp.swin.edu.au/slackware/slackware-9.1/source/xap/xscreensaver/xscreensaver...
[xscreensaver] / driver / timers.c
index 7e9baaacd91c121d57243f090adf1e9b6943e80b..8c068c023e7fcdaec347c582ab6bb7371e9dee41 100644 (file)
@@ -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))
         {
@@ -740,6 +742,19 @@ sleep_until_idle (saver_info *si, Bool until_idle_p)
                     break;
                 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