components/desktop/xscreensaver/patches/0004-atoms.patch
author Rich Burridge <rich.burridge@oracle.com>
Tue, 02 May 2017 17:33:26 -0700
changeset 7964 d9801318ed3d
parent 5561 0416d82f7f55
permissions -rw-r--r--
25981468 Build ilmbase and openexr with the GNU compilers
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
     1
From 9bf12ae3168aa6f9234304a8a376d47962f0d589 Mon Sep 17 00:00:00 2001
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
     2
From: Alan Coopersmith <[email protected]>
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
     3
Date: Sat, 2 Jan 2016 20:11:05 -0800
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
     4
Subject: [PATCH] atoms
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
     5
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     6
Centralize atom handling and use XInternAtoms to get the atoms from
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     7
the server in one round trip instead of a separate synchronous/blocking
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     8
round trip for each XInternAtom individual call.
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     9
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    10
Was offered upstream in 2011 - jwz responded with:
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    11
  I'd sure like to see some kind of performance metrics -- like, any -- before
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    12
  making a big change to something so central. When it comes to the xscreensaver
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    13
  driver I'm a firm believer in "don't fix what ain't broke"...
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    14
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    15
Need to find some time to actually measure that someday (dtrace?).
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    16
---
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    17
 driver/Makefile.in            |  14 +++---
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    18
 driver/atoms.c                | 113 ++++++++++++++++++++++++++++++++++++++++++
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    19
 driver/atoms.h                |  33 ++++++++++++
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    20
 driver/demo-Gtk.c             |  26 +++-------
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    21
 driver/demo-Xm.c              |  25 +++-------
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    22
 driver/remote.c               |   4 +-
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    23
 driver/windows.c              |   3 +-
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    24
 driver/xscreensaver-command.c |  35 +++----------
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    25
 driver/xscreensaver.c         |  47 ++++++------------
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    26
 driver/xscreensaver.h         |   3 --
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    27
 10 files changed, 189 insertions(+), 114 deletions(-)
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    28
 create mode 100644 driver/atoms.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    29
 create mode 100644 driver/atoms.h
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    30
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    31
diff --git a/driver/Makefile.in b/driver/Makefile.in
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    32
index a5b94bf..90ef1d2 100644
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    33
--- a/driver/Makefile.in
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    34
+++ b/driver/Makefile.in
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    35
@@ -188,18 +188,18 @@ SAVER_OBJS_1	= xscreensaver.o windows.o screens.o timers.o subprocs.o \
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    36
 		  exec.o xset.o splash.o setuid.o stderr.o mlstring.o
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    37
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    38
 SAVER_SRCS	= $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    39
-		  $(SAVER_UTIL_SRCS) $(GL_SRCS)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    40
+		  $(SAVER_UTIL_SRCS) $(GL_SRCS) atoms.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    41
 SAVER_OBJS	= $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    42
-		  $(SAVER_UTIL_OBJS) $(GL_OBJS)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    43
+		  $(SAVER_UTIL_OBJS) $(GL_OBJS) atoms.o
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    44
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    45
-CMD_SRCS	= remote.c xscreensaver-command.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    46
-CMD_OBJS	= remote.o xscreensaver-command.o
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    47
+CMD_SRCS	= remote.c atoms.c xscreensaver-command.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    48
+CMD_OBJS	= remote.o atoms.o xscreensaver-command.o
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    49
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    50
 DEMO_SRCS_1	= prefs.c dpms.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    51
 DEMO_OBJS_1	= prefs.o dpms.o
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    52
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    53
-DEMO_SRCS	= $(DEMO_SRCS_1) remote.c exec.c $(DEMO_UTIL_SRCS)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    54
-DEMO_OBJS	= $(DEMO_OBJS_1) remote.o exec.o $(DEMO_UTIL_OBJS)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    55
+DEMO_SRCS	= $(DEMO_SRCS_1) remote.c atoms.c exec.c $(DEMO_UTIL_SRCS)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    56
+DEMO_OBJS	= $(DEMO_OBJS_1) remote.o atoms.o exec.o $(DEMO_UTIL_OBJS)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    57
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    58
 PDF2JPEG_SRCS	= pdf2jpeg.m
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    59
 PDF2JPEG_OBJS	= pdf2jpeg.o
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    60
@@ -228,7 +228,7 @@ SCRIPTS		= $(SCRIPTS_1) @SCRIPTS_OSX@
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    61
 
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    62
 HDRS		= XScreenSaver_ad.h XScreenSaver_Xm_ad.h \
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    63
 		  xscreensaver.h prefs.h remote.h exec.h \
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    64
-		  demo-Gtk-conf.h auth.h mlstring.h types.h
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    65
+		  demo-Gtk-conf.h auth.h mlstring.h types.h atoms.h
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    66
 MEN_1		= xscreensaver.man xscreensaver-demo.man \
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    67
 		  xscreensaver-command.man \
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    68
 		  xscreensaver-text.man \
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    69
diff --git a/driver/atoms.c b/driver/atoms.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    70
new file mode 100644
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
    71
index 0000000..d50bc57
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    72
--- /dev/null
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    73
+++ b/driver/atoms.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    74
@@ -0,0 +1,113 @@
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    75
+/* xscreensaver, Copyright (c) 1991-2010 Jamie Zawinski <[email protected]>
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    76
+ *
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    77
+ * Permission to use, copy, modify, distribute, and sell this software and its
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    78
+ * documentation for any purpose is hereby granted without fee, provided that
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    79
+ * the above copyright notice appear in all copies and that both that
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    80
+ * copyright notice and this permission notice appear in supporting
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    81
+ * documentation.  No representations are made about the suitability of this
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    82
+ * software for any purpose.  It is provided "as is" without express or
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    83
+ * implied warranty.
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    84
+ */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    85
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    86
+#ifdef HAVE_CONFIG_H
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    87
+# include "config.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    88
+#endif
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    89
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    90
+#include <stdio.h>
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    91
+#include <stdlib.h>
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    92
+#include <sys/types.h>
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    93
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    94
+#include <X11/Xproto.h>		/* for CARD32 */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    95
+#include <X11/Xlib.h>
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    96
+#include <X11/Xos.h>
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    97
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    98
+#include "atoms.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    99
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   100
+/* Atoms to retrieve info from remote daemon */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   101
+Atom XA_SCREENSAVER, XA_SCREENSAVER_ID, XA_SCREENSAVER_VERSION,
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   102
+   XA_SCREENSAVER_RESPONSE, XA_SCREENSAVER_STATUS;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   103
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   104
+/* Atoms to send commands to remote daemon */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   105
+Atom XA_ACTIVATE, XA_BLANK, XA_CYCLE, XA_DEACTIVATE, XA_DEMO,
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   106
+  XA_EXIT, XA_LOCK, XA_NEXT, XA_PREFS, XA_PREV, XA_RESTART,
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   107
+  XA_SELECT, XA_THROTTLE, XA_UNTHROTTLE;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   108
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   109
+static const struct atom_request remote_control_atom_list[] =
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   110
+{
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   111
+    { &XA_SCREENSAVER, "SCREENSAVER" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   112
+    { &XA_SCREENSAVER_ID, "_SCREENSAVER_ID" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   113
+    { &XA_SCREENSAVER_VERSION, "_SCREENSAVER_VERSION" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   114
+    { &XA_SCREENSAVER_RESPONSE, "_SCREENSAVER_RESPONSE" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   115
+    { &XA_SCREENSAVER_STATUS, "_SCREENSAVER_STATUS" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   116
+    { &XA_ACTIVATE, "ACTIVATE" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   117
+    { &XA_BLANK, "BLANK" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   118
+    { &XA_CYCLE, "CYCLE" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   119
+    { &XA_DEACTIVATE, "DEACTIVATE" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   120
+    { &XA_DEMO, "DEMO" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   121
+    { &XA_EXIT, "EXIT" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   122
+    { &XA_LOCK, "LOCK" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   123
+    { &XA_NEXT, "NEXT" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   124
+    { &XA_PREFS, "PREFS" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   125
+    { &XA_PREV, "PREV" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   126
+    { &XA_RESTART, "RESTART" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   127
+    { &XA_SELECT, "SELECT" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   128
+    { &XA_THROTTLE, "THROTTLE" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   129
+    { &XA_UNTHROTTLE, "UNTHROTTLE" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   130
+    { NULL, NULL } /* Must be last to terminate list */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   131
+};
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   132
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   133
+const struct atom_request *remote_control_atoms = remote_control_atom_list;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   134
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   135
+/* Load a list of atoms in a single round trip to the X server instead of
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   136
+   waiting for a synchronous round trip for each and every atom */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   137
+Status request_atoms ( Display *dpy,
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   138
+		       const struct atom_request **request_lists )
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   139
+{
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   140
+  int atom_count, n;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   141
+  Status result;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   142
+  const struct atom_request **l, *r;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   143
+  Atom *atoms;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   144
+  const char **names;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   145
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   146
+  /* Count the number of items across all the lists passed in */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   147
+  atom_count = 0;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   148
+  for (l = request_lists; l != NULL && *l != NULL; l++)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   149
+    {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   150
+      for (r = *l; r != NULL && r->name != NULL; r++)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   151
+	{
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   152
+	  atom_count++;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   153
+	}
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   154
+    }
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   155
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   156
+  atoms = calloc(atom_count, sizeof(Atom));
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   157
+  names = calloc(atom_count, sizeof(char *));
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   158
+  if (!atoms || !names)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   159
+    return -1;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   160
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   161
+  n = 0;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   162
+  for (l = request_lists; l != NULL && *l != NULL; l++)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   163
+    {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   164
+      for (r = *l; r != NULL && r->name != NULL; r++)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   165
+	{
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   166
+	  names[n++] = r->name;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   167
+	}
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   168
+    }
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   169
+  result = XInternAtoms( dpy, (char **) names, atom_count, False, atoms );
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   170
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   171
+  n = 0;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   172
+  for (l = request_lists; l != NULL && *l != NULL; l++)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   173
+    {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   174
+      for (r = *l; r != NULL && r->name != NULL; r++)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   175
+	{
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   176
+#if DEBUG_ATOMS
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   177
+	  fprintf (stderr, "atom: %s => %d\n", names[n], atoms[n]);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   178
+#endif
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   179
+	  *(r->atomp) = atoms[n++];
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   180
+	}
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   181
+    }
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   182
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   183
+  free(atoms);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   184
+  free(names);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   185
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   186
+  return result;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   187
+}
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   188
diff --git a/driver/atoms.h b/driver/atoms.h
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   189
new file mode 100644
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   190
index 0000000..09e78f3
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   191
--- /dev/null
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   192
+++ b/driver/atoms.h
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   193
@@ -0,0 +1,33 @@
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   194
+/* xscreensaver, Copyright (c) 1991-2010 Jamie Zawinski <[email protected]>
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   195
+ *
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   196
+ * Permission to use, copy, modify, distribute, and sell this software and its
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   197
+ * documentation for any purpose is hereby granted without fee, provided that
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   198
+ * the above copyright notice appear in all copies and that both that
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   199
+ * copyright notice and this permission notice appear in supporting
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   200
+ * documentation.  No representations are made about the suitability of this
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   201
+ * software for any purpose.  It is provided "as is" without express or
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   202
+ * implied warranty.
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   203
+ */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   204
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   205
+#ifndef _XSCREENSAVER_ATOMS_H_
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   206
+#define _XSCREENSAVER_ATOMS_H_
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   207
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   208
+struct atom_request {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   209
+    Atom *atomp;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   210
+    const char *name;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   211
+};
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   212
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   213
+extern const struct atom_request *remote_control_atoms;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   214
+extern Status request_atoms ( Display *dpy,
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   215
+			      const struct atom_request **request_lists );
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   216
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   217
+/* Atoms to retrieve info from remote daemon */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   218
+extern Atom XA_SCREENSAVER, XA_SCREENSAVER_ID, XA_SCREENSAVER_VERSION,
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   219
+  XA_SCREENSAVER_RESPONSE, XA_SCREENSAVER_STATUS;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   220
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   221
+/* Atoms to send commands to remote daemon */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   222
+extern Atom XA_ACTIVATE, XA_BLANK, XA_CYCLE, XA_DEACTIVATE, XA_DEMO,
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   223
+  XA_EXIT, XA_LOCK, XA_NEXT, XA_PREFS, XA_PREV, XA_RESTART,
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   224
+  XA_SELECT, XA_THROTTLE, XA_UNTHROTTLE;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   225
+
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   226
+#endif /* _XSCREENSAVER_ATOMS_H_ */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   227
diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   228
index 6c449f2..3fa27c3 100644
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   229
--- a/driver/demo-Gtk.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   230
+++ b/driver/demo-Gtk.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   231
@@ -118,6 +118,7 @@
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   232
 #include "resources.h"		/* for parse_time() */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   233
 #include "visual.h"		/* for has_writable_cells() */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   234
 #include "remote.h"		/* for xscreensaver_command() */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   235
+#include "atoms.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   236
 #include "usleep.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   237
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   238
 #include "logo-50.xpm"
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   239
@@ -247,12 +248,6 @@ typedef struct {
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   240
    a closure object of our own down into the various widget callbacks. */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   241
 static state *global_state_kludge;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   242
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   243
-Atom XA_VROOT;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   244
-Atom XA_SCREENSAVER, XA_SCREENSAVER_RESPONSE, XA_SCREENSAVER_VERSION;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   245
-Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_SELECT, XA_DEMO;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   246
-Atom XA_ACTIVATE, XA_BLANK, XA_LOCK, XA_RESTART, XA_EXIT;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   247
-
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   248
-
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   249
 static void populate_demo_window (state *, int list_elt);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   250
 static void populate_prefs_page (state *);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   251
 static void populate_popup_window (state *);
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   252
@@ -5068,20 +5063,11 @@ main (int argc, char **argv)
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   253
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   254
   /* Intern the atoms that xscreensaver_command() needs.
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   255
    */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   256
-  XA_VROOT = XInternAtom (dpy, "__SWM_VROOT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   257
-  XA_SCREENSAVER = XInternAtom (dpy, "SCREENSAVER", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   258
-  XA_SCREENSAVER_VERSION = XInternAtom (dpy, "_SCREENSAVER_VERSION",False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   259
-  XA_SCREENSAVER_STATUS = XInternAtom (dpy, "_SCREENSAVER_STATUS", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   260
-  XA_SCREENSAVER_ID = XInternAtom (dpy, "_SCREENSAVER_ID", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   261
-  XA_SCREENSAVER_RESPONSE = XInternAtom (dpy, "_SCREENSAVER_RESPONSE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   262
-  XA_SELECT = XInternAtom (dpy, "SELECT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   263
-  XA_DEMO = XInternAtom (dpy, "DEMO", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   264
-  XA_ACTIVATE = XInternAtom (dpy, "ACTIVATE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   265
-  XA_BLANK = XInternAtom (dpy, "BLANK", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   266
-  XA_LOCK = XInternAtom (dpy, "LOCK", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   267
-  XA_EXIT = XInternAtom (dpy, "EXIT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   268
-  XA_RESTART = XInternAtom (dpy, "RESTART", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   269
-
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   270
+  {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   271
+    const struct atom_request *atom_lists[2] = { NULL, NULL };
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   272
+    atom_lists[0] = remote_control_atoms;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   273
+    request_atoms (dpy, atom_lists);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   274
+  }
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   275
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   276
   /* Create the window and all its widgets.
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   277
    */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   278
diff --git a/driver/demo-Xm.c b/driver/demo-Xm.c
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   279
index 56d1aac..a3e6567 100644
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   280
--- a/driver/demo-Xm.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   281
+++ b/driver/demo-Xm.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   282
@@ -82,6 +82,7 @@
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   283
 #include "resources.h"		/* for parse_time() */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   284
 #include "visual.h"		/* for has_writable_cells() */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   285
 #include "remote.h"		/* for xscreensaver_command() */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   286
+#include "atoms.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   287
 #include "usleep.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   288
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   289
 #include <stdio.h>
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   290
@@ -110,12 +111,6 @@ extern const char *visual_menu[];
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   291
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   292
 static char *short_version = 0;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   293
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   294
-Atom XA_VROOT;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   295
-Atom XA_SCREENSAVER, XA_SCREENSAVER_RESPONSE, XA_SCREENSAVER_VERSION;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   296
-Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_SELECT, XA_DEMO;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   297
-Atom XA_ACTIVATE, XA_BLANK, XA_LOCK, XA_RESTART, XA_EXIT;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   298
-
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   299
-
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   300
 static void populate_demo_window (Widget toplevel,
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   301
                                   int which, prefs_pair *pair);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   302
 static void populate_prefs_page (Widget top, prefs_pair *pair);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   303
@@ -1791,19 +1786,11 @@ main (int argc, char **argv)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   304
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   305
   /* Intern the atoms that xscreensaver_command() needs.
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   306
    */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   307
-  XA_VROOT = XInternAtom (dpy, "__SWM_VROOT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   308
-  XA_SCREENSAVER = XInternAtom (dpy, "SCREENSAVER", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   309
-  XA_SCREENSAVER_VERSION = XInternAtom (dpy, "_SCREENSAVER_VERSION",False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   310
-  XA_SCREENSAVER_STATUS = XInternAtom (dpy, "_SCREENSAVER_STATUS", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   311
-  XA_SCREENSAVER_ID = XInternAtom (dpy, "_SCREENSAVER_ID", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   312
-  XA_SCREENSAVER_RESPONSE = XInternAtom (dpy, "_SCREENSAVER_RESPONSE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   313
-  XA_SELECT = XInternAtom (dpy, "SELECT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   314
-  XA_DEMO = XInternAtom (dpy, "DEMO", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   315
-  XA_ACTIVATE = XInternAtom (dpy, "ACTIVATE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   316
-  XA_BLANK = XInternAtom (dpy, "BLANK", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   317
-  XA_LOCK = XInternAtom (dpy, "LOCK", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   318
-  XA_EXIT = XInternAtom (dpy, "EXIT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   319
-  XA_RESTART = XInternAtom (dpy, "RESTART", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   320
+  {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   321
+    const struct atom_request *atom_lists[2] = { NULL, NULL };
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   322
+    atom_lists[0] = remote_control_atoms;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   323
+    request_atoms (dpy, atom_lists);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   324
+  }
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   325
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   326
   /* Create the window and all its widgets.
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   327
    */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   328
diff --git a/driver/remote.c b/driver/remote.c
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   329
index 775036a..59e30c1 100644
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   330
--- a/driver/remote.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   331
+++ b/driver/remote.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   332
@@ -34,15 +34,13 @@
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   333
 #include <X11/Xos.h>
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   334
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   335
 #include "remote.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   336
+#include "atoms.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   337
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   338
 #ifdef _VROOT_H_
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   339
 ERROR! you must not include vroot.h in this file
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   340
 #endif
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   341
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   342
 extern char *progname;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   343
-extern Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_RESPONSE;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   344
-extern Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_EXIT;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   345
-extern Atom XA_VROOT, XA_SELECT, XA_DEMO, XA_BLANK, XA_LOCK;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   346
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   347
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   348
 static XErrorHandler old_handler = 0;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   349
diff --git a/driver/windows.c b/driver/windows.c
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   350
index d33f251..6acaddb 100644
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   351
--- a/driver/windows.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   352
+++ b/driver/windows.c
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   353
@@ -69,14 +69,13 @@ typedef long PROP32;
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   354
 #include "xscreensaver.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   355
 #include "visual.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   356
 #include "fade.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   357
+#include "atoms.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   358
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   359
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   360
 extern int kill (pid_t, int);		/* signal() is in sys/signal.h... */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   361
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   362
 Atom XA_VROOT, XA_XSETROOT_ID, XA_ESETROOT_PMAP_ID, XA_XROOTPMAP_ID;
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   363
 Atom XA_NET_WM_USER_TIME;
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   364
-Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_ID;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   365
-Atom XA_SCREENSAVER_STATUS;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   366
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   367
 extern saver_info *global_si_kludge;	/* I hate C so much... */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   368
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   369
diff --git a/driver/xscreensaver-command.c b/driver/xscreensaver-command.c
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   370
index 0057438..80b2813 100644
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   371
--- a/driver/xscreensaver-command.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   372
+++ b/driver/xscreensaver-command.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   373
@@ -40,6 +40,7 @@
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   374
 typedef long PROP32;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   375
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   376
 #include "remote.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   377
+#include "atoms.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   378
 #include "version.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   379
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   380
 #ifdef _VROOT_H_
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   381
@@ -48,13 +49,6 @@ ERROR! you must not include vroot.h in this file
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   382
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   383
 char *progname;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   384
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   385
-Atom XA_VROOT;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   386
-Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_RESPONSE;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   387
-Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_SELECT, XA_DEMO, XA_EXIT;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   388
-Atom XA_BLANK, XA_LOCK;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   389
-static Atom XA_ACTIVATE, XA_DEACTIVATE, XA_CYCLE, XA_NEXT, XA_PREV;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   390
-static Atom XA_RESTART, XA_PREFS, XA_THROTTLE, XA_UNTHROTTLE;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   391
-
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   392
 static char *screensaver_version;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   393
 # ifdef __GNUC__
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   394
   __extension__   /* don't warn about "string length is greater than the
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   395
@@ -292,28 +286,11 @@ main (int argc, char **argv)
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   396
       exit (1);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   397
     }
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   398
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   399
-  XA_VROOT = XInternAtom (dpy, "__SWM_VROOT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   400
-  XA_SCREENSAVER = XInternAtom (dpy, "SCREENSAVER", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   401
-  XA_SCREENSAVER_ID = XInternAtom (dpy, "_SCREENSAVER_ID", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   402
-  XA_SCREENSAVER_VERSION = XInternAtom (dpy, "_SCREENSAVER_VERSION",False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   403
-  XA_SCREENSAVER_STATUS = XInternAtom (dpy, "_SCREENSAVER_STATUS", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   404
-  XA_SCREENSAVER_RESPONSE = XInternAtom (dpy, "_SCREENSAVER_RESPONSE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   405
-  XA_ACTIVATE = XInternAtom (dpy, "ACTIVATE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   406
-  XA_DEACTIVATE = XInternAtom (dpy, "DEACTIVATE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   407
-  XA_RESTART = XInternAtom (dpy, "RESTART", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   408
-  XA_CYCLE = XInternAtom (dpy, "CYCLE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   409
-  XA_NEXT = XInternAtom (dpy, "NEXT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   410
-  XA_PREV = XInternAtom (dpy, "PREV", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   411
-  XA_SELECT = XInternAtom (dpy, "SELECT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   412
-  XA_EXIT = XInternAtom (dpy, "EXIT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   413
-  XA_DEMO = XInternAtom (dpy, "DEMO", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   414
-  XA_PREFS = XInternAtom (dpy, "PREFS", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   415
-  XA_LOCK = XInternAtom (dpy, "LOCK", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   416
-  XA_BLANK = XInternAtom (dpy, "BLANK", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   417
-  XA_THROTTLE = XInternAtom (dpy, "THROTTLE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   418
-  XA_UNTHROTTLE = XInternAtom (dpy, "UNTHROTTLE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   419
-
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   420
-  XSync (dpy, 0);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   421
+  {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   422
+    const struct atom_request *atom_lists[2] = { NULL, NULL };
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   423
+    atom_lists[0] = remote_control_atoms;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   424
+    request_atoms (dpy, atom_lists);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   425
+  }
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   426
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   427
   if (cmd == &XA_WATCH)
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   428
     {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   429
diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   430
index 45f0f0c..06f5c13 100644
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   431
--- a/driver/xscreensaver.c
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   432
+++ b/driver/xscreensaver.c
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   433
@@ -232,6 +232,7 @@
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   434
 #include "visual.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   435
 #include "usleep.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   436
 #include "auth.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   437
+#include "atoms.h"
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   438
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   439
 saver_info *global_si_kludge = 0;	/* I hate C so much... */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   440
 
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   441
@@ -240,12 +241,6 @@ char *progclass = 0;
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   442
 XrmDatabase db = 0;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   443
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   444
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   445
-static Atom XA_SCREENSAVER_RESPONSE;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   446
-static Atom XA_ACTIVATE, XA_DEACTIVATE, XA_CYCLE, XA_NEXT, XA_PREV;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   447
-static Atom XA_RESTART, XA_SELECT;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   448
-static Atom XA_THROTTLE, XA_UNTHROTTLE;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   449
-Atom XA_DEMO, XA_PREFS, XA_EXIT, XA_LOCK, XA_BLANK;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   450
-
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   451
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   452
 static XrmOptionDescRec options [] = {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   453
 
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   454
@@ -667,31 +662,21 @@ connect_to_server (saver_info *si, int *argc, char **argv)
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   455
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   456
   db = si->prefs.db;	/* resources.c needs this */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   457
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   458
-  XA_VROOT = XInternAtom (si->dpy, "__SWM_VROOT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   459
-  XA_SCREENSAVER = XInternAtom (si->dpy, "SCREENSAVER", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   460
-  XA_SCREENSAVER_VERSION = XInternAtom (si->dpy, "_SCREENSAVER_VERSION",False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   461
-  XA_SCREENSAVER_ID = XInternAtom (si->dpy, "_SCREENSAVER_ID", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   462
-  XA_SCREENSAVER_STATUS = XInternAtom (si->dpy, "_SCREENSAVER_STATUS", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   463
-  XA_SCREENSAVER_RESPONSE = XInternAtom (si->dpy, "_SCREENSAVER_RESPONSE",
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   464
-					 False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   465
-  XA_XSETROOT_ID = XInternAtom (si->dpy, "_XSETROOT_ID", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   466
-  XA_ESETROOT_PMAP_ID = XInternAtom (si->dpy, "ESETROOT_PMAP_ID", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   467
-  XA_XROOTPMAP_ID = XInternAtom (si->dpy, "_XROOTPMAP_ID", False);
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   468
-  XA_NET_WM_USER_TIME = XInternAtom (si->dpy, "_NET_WM_USER_TIME", False);
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   469
-  XA_ACTIVATE = XInternAtom (si->dpy, "ACTIVATE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   470
-  XA_DEACTIVATE = XInternAtom (si->dpy, "DEACTIVATE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   471
-  XA_RESTART = XInternAtom (si->dpy, "RESTART", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   472
-  XA_CYCLE = XInternAtom (si->dpy, "CYCLE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   473
-  XA_NEXT = XInternAtom (si->dpy, "NEXT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   474
-  XA_PREV = XInternAtom (si->dpy, "PREV", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   475
-  XA_SELECT = XInternAtom (si->dpy, "SELECT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   476
-  XA_EXIT = XInternAtom (si->dpy, "EXIT", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   477
-  XA_DEMO = XInternAtom (si->dpy, "DEMO", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   478
-  XA_PREFS = XInternAtom (si->dpy, "PREFS", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   479
-  XA_LOCK = XInternAtom (si->dpy, "LOCK", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   480
-  XA_BLANK = XInternAtom (si->dpy, "BLANK", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   481
-  XA_THROTTLE = XInternAtom (si->dpy, "THROTTLE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   482
-  XA_UNTHROTTLE = XInternAtom (si->dpy, "UNTHROTTLE", False);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   483
+  {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   484
+    const struct atom_request root_atoms[] =
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   485
+      {
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   486
+	{ &XA_VROOT, "__SWM_VROOT" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   487
+	{ &XA_XSETROOT_ID, "_XSETROOT_ID" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   488
+	{ &XA_ESETROOT_PMAP_ID, "ESETROOT_PMAP_ID" },
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   489
+	{ &XA_XROOTPMAP_ID, "_XROOTPMAP_ID" },
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   490
+	{ &XA_NET_WM_USER_TIME, "_NET_WM_USER_TIME" },
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   491
+	{ NULL, NULL } /* Must be last to terminate list */
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   492
+      };
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   493
+    const struct atom_request *atom_lists[3] = { NULL, NULL, NULL };
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   494
+    atom_lists[0] = remote_control_atoms;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   495
+    atom_lists[1] = root_atoms;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   496
+    request_atoms (si->dpy, atom_lists);
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   497
+  }
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   498
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   499
   return toplevel_shell;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   500
 }
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   501
diff --git a/driver/xscreensaver.h b/driver/xscreensaver.h
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   502
index d67966e..064e9c4 100644
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   503
--- a/driver/xscreensaver.h
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   504
+++ b/driver/xscreensaver.h
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   505
@@ -202,8 +202,5 @@ Bool safe_XF86VidModeGetViewPort (Display *, int, int *, int *);
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   506
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   507
 extern Atom XA_VROOT, XA_XSETROOT_ID, XA_ESETROOT_PMAP_ID, XA_XROOTPMAP_ID;
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   508
 extern Atom XA_NET_WM_USER_TIME;
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   509
-extern Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_ID;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   510
-extern Atom XA_SCREENSAVER_STATUS, XA_LOCK, XA_BLANK;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   511
-extern Atom XA_DEMO, XA_PREFS;
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   512
 
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   513
 #endif /* __XSCREENSAVER_H__ */
5561
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   514
-- 
0416d82f7f55 22593000 Upgrade xscreensaver to version 5.34
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 5400
diff changeset
   515
2.6.1
5400
1199f8e91f50 22592978 Move xscreensaver to the Userland gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   516