/*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
---
- $(SAVER_UTIL_SRCS) $(GL_SRCS)
- $(SAVER_UTIL_OBJS) $(GL_OBJS)
@@ -0,0 +1,113 @@
+/* xscreensaver, Copyright (c) 1991-2010 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+# include "config.h"
+#endif
+
+#include <sys/types.h>
+
+#include <X11/Xlib.h>
+
+#include "atoms.h"
+
+/* Atoms to retrieve info from remote daemon */
+
+/* Atoms to send commands to remote daemon */
+
+{
+ { &XA_SCREENSAVER, "SCREENSAVER" },
+ { &XA_SCREENSAVER_ID, "_SCREENSAVER_ID" },
+ { &XA_SCREENSAVER_VERSION, "_SCREENSAVER_VERSION" },
+ { &XA_SCREENSAVER_RESPONSE, "_SCREENSAVER_RESPONSE" },
+ { &XA_SCREENSAVER_STATUS, "_SCREENSAVER_STATUS" },
+ { &XA_ACTIVATE, "ACTIVATE" },
+ { &XA_BLANK, "BLANK" },
+ { &XA_CYCLE, "CYCLE" },
+ { &XA_DEACTIVATE, "DEACTIVATE" },
+ { &XA_DEMO, "DEMO" },
+ { &XA_EXIT, "EXIT" },
+ { &XA_LOCK, "LOCK" },
+ { &XA_NEXT, "NEXT" },
+ { &XA_PREFS, "PREFS" },
+ { &XA_PREV, "PREV" },
+ { &XA_RESTART, "RESTART" },
+ { &XA_SELECT, "SELECT" },
+ { &XA_THROTTLE, "THROTTLE" },
+ { &XA_UNTHROTTLE, "UNTHROTTLE" },
+};
+
+
+/* Load a list of atoms in a single round trip to the X server instead of
+ waiting for a synchronous round trip for each and every atom */
+{
+ int atom_count, n;
+ const struct atom_request **l, *r;
+ const char **names;
+
+ /* Count the number of items across all the lists passed in */
+ atom_count = 0;
+ {
+ {
+ atom_count++;
+ }
+ }
+
+ return -1;
+
+ n = 0;
+ {
+ {
+ }
+ }
+
+ n = 0;
+ {
+ {
+#if DEBUG_ATOMS
+#endif
+ }
+ }
+
+
+ return result;
+}
@@ -0,0 +1,33 @@
+/* xscreensaver, Copyright (c) 1991-2010 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+
+ const char *name;
+};
+
+
+/* Atoms to retrieve info from remote daemon */
+
+/* Atoms to send commands to remote daemon */
+
+#endif /* _XSCREENSAVER_ATOMS_H_ */
@@ -118,6 +118,7 @@
+#include "atoms.h"
#include "usleep.h"
#include "logo-50.xpm"
static state *global_state_kludge;
-
-
static void populate_prefs_page (state *);
static void populate_popup_window (state *);
/* Intern the atoms that xscreensaver_command() needs.
*/
-
+ {
+ }
/* Create the window and all its widgets.
*/
@@ -82,6 +82,7 @@
+#include "atoms.h"
#include "usleep.h"
static char *short_version = 0;
-
-
/* Intern the atoms that xscreensaver_command() needs.
*/
+ {
+ }
/* Create the window and all its widgets.
*/
@@ -34,15 +34,13 @@
#include "remote.h"
+#include "atoms.h"
#include "xscreensaver.h"
#include "visual.h"
#include "fade.h"
+#include "atoms.h"
-
diff --git xscreensaver-5.12/driver/xscreensaver-command.c xscreensaver-5.12/driver/xscreensaver-command.c
@@ -40,6 +40,7 @@
#include "remote.h"
+#include "atoms.h"
#include "version.h"
char *progname;
-
static char *screensaver_version;
__extension__ /* don't warn about "string length is greater than the
@@ -285,28 +279,11 @@ main (int argc, char **argv)
exit (1);
}
- XA_VROOT = XInternAtom (dpy, "__SWM_VROOT", False);
- XA_SCREENSAVER = XInternAtom (dpy, "SCREENSAVER", False);
- XA_SCREENSAVER_ID = XInternAtom (dpy, "_SCREENSAVER_ID", False);
- XA_SCREENSAVER_VERSION = XInternAtom (dpy, "_SCREENSAVER_VERSION",False);
- XA_SCREENSAVER_STATUS = XInternAtom (dpy, "_SCREENSAVER_STATUS", False);
- XA_SCREENSAVER_RESPONSE = XInternAtom (dpy, "_SCREENSAVER_RESPONSE", False);
- XA_ACTIVATE = XInternAtom (dpy, "ACTIVATE", False);
- XA_DEACTIVATE = XInternAtom (dpy, "DEACTIVATE", False);
- XA_RESTART = XInternAtom (dpy, "RESTART", False);
- XA_CYCLE = XInternAtom (dpy, "CYCLE", False);
- XA_NEXT = XInternAtom (dpy, "NEXT", False);
- XA_PREV = XInternAtom (dpy, "PREV", False);
- XA_SELECT = XInternAtom (dpy, "SELECT", False);
- XA_EXIT = XInternAtom (dpy, "EXIT", False);
- XA_DEMO = XInternAtom (dpy, "DEMO", False);
- XA_PREFS = XInternAtom (dpy, "PREFS", False);
- XA_LOCK = XInternAtom (dpy, "LOCK", False);
- XA_BLANK = XInternAtom (dpy, "BLANK", False);
- XA_THROTTLE = XInternAtom (dpy, "THROTTLE", False);
- XA_UNTHROTTLE = XInternAtom (dpy, "UNTHROTTLE", False);
-
- XSync (dpy, 0);
+ {
+ const struct atom_request *atom_lists[2] = { NULL, NULL };
+ atom_lists[0] = remote_control_atoms;
+ request_atoms (dpy, atom_lists);
+ }
if (cmd == &XA_WATCH)
{
@@ -224,6 +224,7 @@
#include "visual.h"
#include "usleep.h"
#include "auth.h"
+#include "atoms.h"
saver_info *global_si_kludge = 0; /* I hate C so much... */
-static Atom XA_SCREENSAVER_RESPONSE;
-
static XrmOptionDescRec options [] = {
- False);
+ {
+ {
+ { &XA_VROOT, "__SWM_VROOT" },
+ { &XA_XSETROOT_ID, "_XSETROOT_ID" },
+ { &XA_ESETROOT_PMAP_ID, "ESETROOT_PMAP_ID" },
+ { &XA_XROOTPMAP_ID, "_XROOTPMAP_ID" },
+ };
+ }
return toplevel_shell;
}
#endif /* HAVE_XF86VMODE */
#endif /* __XSCREENSAVER_H__ */