From 4da3a69fc7914b46b637058e89a8024e29749155 Mon Sep 17 00:00:00 2001 From: oga Date: Thu, 22 Jan 2009 15:26:33 +0000 Subject: 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@. --- calmwm.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'calmwm.h') diff --git a/calmwm.h b/calmwm.h index 96152cd..4869890 100644 --- a/calmwm.h +++ b/calmwm.h @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: calmwm.h,v 1.77 2009/01/21 15:04:38 todd Exp $ + * $Id: calmwm.h,v 1.78 2009/01/22 15:26:33 oga Exp $ */ #ifndef _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_ */ -- cgit v1.2.3-2-gb3c3