[PATCH 5/5] Use predefined atoms to decrease latency
Julien Danjou
julien at danjou.info
Mon May 24 10:01:36 PDT 2010
Signed-off-by: Julien Danjou <julien at danjou.info>
---
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));
}
--
1.7.1
More information about the xdg
mailing list