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@.
This commit is contained in:
oga
2009-01-22 15:26:33 +00:00
parent 1b269199c1
commit e2f3810fe8
4 changed files with 32 additions and 28 deletions

View File

@@ -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_ */