summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
authoroga <oga>2009-01-22 15:26:33 +0000
committeroga <oga>2009-01-22 15:26:33 +0000
commite2f3810fe83a7c7fdb4bd245ccdf5e4e343d1a55 (patch)
treeafd3688024ca82fb9f224c3f7b9d1034d2febb19 /calmwm.h
parent1b269199c16190c92f9318152c5beb84a854be3c (diff)
downloadcwm-e2f3810fe83a7c7fdb4bd245ccdf5e4e343d1a55.tar.gz
cwm-e2f3810fe83a7c7fdb4bd245ccdf5e4e343d1a55.tar.xz
cwm-e2f3810fe83a7c7fdb4bd245ccdf5e4e343d1a55.zip
Cache all of the X atoms we use at startup.
Do this instead of querying for them every time we use them. This
removes an XXX that has been in there since time began. This will become
more important as we move towards supporting netwm.

ok todd@, okan@.
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/calmwm.h b/calmwm.h
index 83dadde..95c4e8c 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -373,6 +373,7 @@ struct xevent		*xev_new(Window *, Window *, int,
 void			 xev_register(struct xevent *);
 void			 xev_loop(void);
 
+void			 xu_getatoms(void);
 int			 xu_ptr_grab(Window, int, Cursor);
 void			 xu_btn_grab(Window, int, u_int);
 int			 xu_ptr_regrab(int, Cursor);
@@ -506,4 +507,13 @@ extern struct client_ctx_q		 Clientq;
 extern int				 HasXinerama, HasRandr, Randr_ev;
 extern struct conf			 Conf;
 
+#define	WM_STATE			 cwm_atoms[0]
+#define WM_DELETE_WINDOW		 cwm_atoms[1]
+#define WM_TAKE_FOCUS			 cwm_atoms[2]
+#define WM_PROTOCOLS			 cwm_atoms[3]
+#define _MOTIF_WM_HINTS			 cwm_atoms[4]
+#define CWM_NO_ATOMS			 5
+
+extern Atom				 cwm_atoms[CWM_NO_ATOMS];
+
 #endif /* _CALMWM_H_ */