diff options
author | Julien Danjou <julien@danjou.info> | 2010-05-24 18:34:46 +0200 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2010-05-25 18:53:52 +0200 |
commit | b731d1a163c182a80d7cd92751030d0abd94a265 (patch) | |
tree | 20610b835e8e0e8946feb1f03aa540cadcf9ffbb | |
parent | e40dbe3b9cc325bc84489655915125878a30b368 (diff) | |
download | startup-notification-b731d1a163c182a80d7cd92751030d0abd94a265.tar.gz |
Use predefined atoms to decrease latency
Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r-- | test/test-launcher.c | 12 |
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)); } |