summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2010-05-24 18:34:46 +0200
committerJulien Danjou <julien@danjou.info>2010-05-25 18:53:52 +0200
commitb731d1a163c182a80d7cd92751030d0abd94a265 (patch)
tree20610b835e8e0e8946feb1f03aa540cadcf9ffbb
parente40dbe3b9cc325bc84489655915125878a30b368 (diff)
downloadstartup-notification-b731d1a163c182a80d7cd92751030d0abd94a265.tar.gz
Use predefined atoms to decrease latency
Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r--test/test-launcher.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/test-launcher.c b/test/test-launcher.c
index 65a4cec..17f3c1e 100644
--- a/test/test-launcher.c
+++ b/test/test-launcher.c
@@ -25,6 +25,7 @@
#include <config.h>
#include <libsn/sn.h>
#include <assert.h>
+#include <X11/Xatom.h>
#include "test-boilerplate.h"
@@ -45,8 +46,6 @@ slowly_obtain_timestamp (SnDisplay *display)
{
XSetWindowAttributes attrs;
- Atom atom_name;
- Atom atom_type;
char* name;
attrs.override_redirect = True;
@@ -63,15 +62,10 @@ slowly_obtain_timestamp (SnDisplay *display)
CWOverrideRedirect | CWEventMask,
&attrs);
- atom_name = XInternAtom (xdisplay, "WM_NAME", TRUE);
- assert (atom_name != None);
- atom_type = XInternAtom (xdisplay, "STRING", TRUE);
- assert (atom_type != None);
-
name = "Fake Window";
XChangeProperty (xdisplay,
- xwindow, atom_name,
- atom_type,
+ xwindow, XA_WM_NAME,
+ XA_STRING,
8, PropModeReplace, name, strlen (name));
}