summaryrefslogtreecommitdiff
path: root/app/cwm/xutil.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-01-23 20:04:31 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-01-23 20:04:31 +0000
commit83094eb53b725c6188bc0cae9951f82e6c67a4d5 (patch)
tree082ace351b5f32105ef92825873db433c7e73ff9 /app/cwm/xutil.c
parentdb8990d9b1026ac6ca8e4f7df5cc5bc0be098a0f (diff)
Switch to using XInternAtoms for caching the atom numbers. Saves a pile
of function calls and server roundtrips. ok okan@
Diffstat (limited to 'app/cwm/xutil.c')
-rw-r--r--app/cwm/xutil.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/app/cwm/xutil.c b/app/cwm/xutil.c
index cd8318370..3b4845e91 100644
--- a/app/cwm/xutil.c
+++ b/app/cwm/xutil.c
@@ -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: xutil.c,v 1.11 2009/01/22 18:06:16 oga Exp $
+ * $Id: xutil.c,v 1.12 2009/01/23 20:04:30 oga Exp $
*/
#include "headers.h"
@@ -170,13 +170,17 @@ xu_setstate(struct client_ctx *cc, int state)
}
Atom cwm_atoms[CWM_NO_ATOMS];
+char *atoms[CWM_NO_ATOMS] = {
+ "WM_STATE",
+ "WM_DELETE_WINDOW",
+ "WM_TAKE_FOCUS",
+ "WM_PROTOCOLS",
+ "_MOTIF_WM_HINTS"
+};
+
void
xu_getatoms(void)
{
- WM_STATE = XInternAtom(X_Dpy, "WM_STATE", False);
- WM_DELETE_WINDOW = XInternAtom(X_Dpy, "WM_DELETE_WINDOW", False);
- WM_TAKE_FOCUS = XInternAtom(X_Dpy, "WM_TAKE_FOCUS", False);
- WM_PROTOCOLS = XInternAtom(X_Dpy, "WM_PROTOCOLS", False);
- _MOTIF_WM_HINTS = XInternAtom(X_Dpy, "_MOTIF_WM_HINTS", False);
+ XInternAtoms(X_Dpy, atoms, CWM_NO_ATOMS, False, cwm_atoms);
}