Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]
  1 --- xscreensaver-4.00/driver/remote.h   Sun Nov 14 01:15:07 1999
  2 +++ remote.h    Tue Mar 26 11:01:34 2002
  3 @@ -21,4 +21,6 @@
  4                                          char **user_ret,
  5                                          char **host_ret);
  6  
  7 +extern void xscreensaver_init(Display *dpy);
  8 +
  9  #endif /* _XSCREENSAVER_REMOTE_H_ */
 10 --- xscreensaver-4.00/driver/remote.c   Mon Dec 20 12:24:19 1999
 11 +++ remote.c    Tue Mar 26 11:31:14 2002
 12 @@ -33,16 +33,20 @@
 13  #include <X11/Xutil.h>         /* for XGetClassHint() */
 14  #include <X11/Xos.h>
 15  
 16 +/* for xawtv */
 17 +#include <X11/Intrinsic.h>
 18 +extern XtAppContext      app_context;
 19 +
 20  #include "remote.h"
 21  
 22  #ifdef _VROOT_H_
 23  ERROR! you must not include vroot.h in this file
 24  #endif
 25  
 26 -extern char *progname;
 27 -extern Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_RESPONSE;
 28 -extern Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_EXIT;
 29 -extern Atom XA_VROOT, XA_SELECT, XA_DEMO, XA_BLANK, XA_LOCK;
 30 +static char *progname = "fixme";
 31 +static Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_RESPONSE;
 32 +static Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_EXIT;
 33 +static Atom XA_VROOT, XA_SELECT, XA_DEMO, XA_BLANK, XA_LOCK;
 34  
 35  
 36  static XErrorHandler old_handler = 0;
 37 @@ -261,13 +265,13 @@
 38                      }
 39  
 40                  if (any && nhacks == 1)
 41 -                  fprintf (stdout, " (hack #%d)\n", data[2]);
 42 +                  fprintf (stdout, " (hack #%ld)\n", data[2]);
 43                  else if (any)
 44                    {
 45                      fprintf (stdout, " (hacks: ");
 46                      for (i = 0; i < nhacks; i++)
 47                        {
 48 -                        fprintf (stdout, "#%d", data[2 + i]);
 49 +                        fprintf (stdout, "#%ld", data[2 + i]);
 50                          if (i != nhacks-1)
 51                            fputs (", ", stdout);
 52                        }
 53 @@ -380,7 +384,7 @@
 54        else
 55         {
 56           XEvent event;
 57 -         XNextEvent (dpy, &event);
 58 +          XtAppNextEvent(app_context,&event);
 59           if (event.xany.type == PropertyNotify &&
 60               event.xproperty.state == PropertyNewValue &&
 61               event.xproperty.atom == XA_SCREENSAVER_RESPONSE)
 62 @@ -459,6 +463,8 @@
 63                       return ret;
 64                     }
 65                 }
 66 +           } else {
 67 +               XtDispatchEvent(&event);
 68             }
 69         }
 70      }
 71 @@ -568,3 +574,18 @@
 72         XFree (id);
 73      }
 74  }
 75 +
 76 +void xscreensaver_init(Display *dpy)
 77 +{
 78 +    XA_VROOT = XInternAtom (dpy, "__SWM_VROOT", False);
 79 +    XA_SCREENSAVER = XInternAtom (dpy, "SCREENSAVER", False);
 80 +    XA_SCREENSAVER_ID = XInternAtom (dpy, "_SCREENSAVER_ID", False);
 81 +    XA_SCREENSAVER_VERSION = XInternAtom (dpy, "_SCREENSAVER_VERSION",False);
 82 +    XA_SCREENSAVER_STATUS = XInternAtom (dpy, "_SCREENSAVER_STATUS", False);
 83 +    XA_SCREENSAVER_RESPONSE = XInternAtom (dpy, "_SCREENSAVER_RESPONSE", False);
 84 +    XA_SELECT = XInternAtom (dpy, "SELECT", False);
 85 +    XA_EXIT = XInternAtom (dpy, "EXIT", False);
 86 +    XA_DEMO = XInternAtom (dpy, "DEMO", False);
 87 +    XA_LOCK = XInternAtom (dpy, "LOCK", False);
 88 +    XA_BLANK = XInternAtom (dpy, "BLANK", False);
 89 +}
  This page was automatically generated by the LXR engine.