about summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authorokan <okan>2013-07-16 14:30:48 +0000
committerokan <okan>2013-07-16 14:30:48 +0000
commit0dec9e849d3ed5dc19882ca4184d01cff5843779 (patch)
tree8593a8f4d664f05dcc771ea0c310038e86342e3b /conf.c
parent93bfc4a5c14db580a426571b8be6011998189ad2 (diff)
parenta439012b5806997e60df870faad87a5fec20d4e8 (diff)
downloadcwm-0dec9e849d3ed5dc19882ca4184d01cff5843779.tar.gz
cwm-0dec9e849d3ed5dc19882ca4184d01cff5843779.tar.xz
cwm-0dec9e849d3ed5dc19882ca4184d01cff5843779.zip
cvsimport
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/conf.c b/conf.c
index 8331ad2..41e5a9f 100644
--- a/conf.c
+++ b/conf.c
@@ -288,7 +288,7 @@ conf_clear(struct conf *c)
 		free(mb);
 	}
 
-	for (i = 0; i < CWM_COLOR_MAX; i++)
+	for (i = 0; i < CWM_COLOR_NITEMS; i++)
 		free(c->color[i]);
 
 	free(c->font);
@@ -624,7 +624,7 @@ conf_unbind_mouse(struct conf *c, struct mousebinding *unbind)
 	}
 }
 
-static int cursor_binds[CF_NITEMS] = {
+static int cursor_binds[] = {
 	XC_X_cursor,		/* CF_DEFAULT */
 	XC_fleur,		/* CF_MOVE */
 	XC_left_ptr,		/* CF_NORMAL */
@@ -663,3 +663,40 @@ conf_grab_kbd(Window win)
 	TAILQ_FOREACH(kb, &Conf.keybindingq, entry)
 		xu_key_grab(win, kb->modmask, kb->keysym);
 }
+
+static char *cwmhints[] = {
+	"WM_STATE",
+	"WM_DELETE_WINDOW",
+	"WM_TAKE_FOCUS",
+	"WM_PROTOCOLS",
+	"_MOTIF_WM_HINTS",
+	"UTF8_STRING",
+	"WM_CHANGE_STATE",
+};
+static char *ewmhints[] = {
+	"_NET_SUPPORTED",
+	"_NET_SUPPORTING_WM_CHECK",
+	"_NET_ACTIVE_WINDOW",
+	"_NET_CLIENT_LIST",
+	"_NET_NUMBER_OF_DESKTOPS",
+	"_NET_CURRENT_DESKTOP",
+	"_NET_DESKTOP_VIEWPORT",
+	"_NET_DESKTOP_GEOMETRY",
+	"_NET_VIRTUAL_ROOTS",
+	"_NET_SHOWING_DESKTOP",
+	"_NET_DESKTOP_NAMES",
+	"_NET_WORKAREA",
+	"_NET_WM_NAME",
+	"_NET_WM_DESKTOP",
+	"_NET_CLOSE_WINDOW",
+	"_NET_WM_STATE",
+	"_NET_WM_STATE_MAXIMIZED_VERT",
+	"_NET_WM_STATE_MAXIMIZED_HORZ",
+};
+
+void
+conf_atoms(void)
+{
+	XInternAtoms(X_Dpy, cwmhints, nitems(cwmhints), False, cwmh);
+	XInternAtoms(X_Dpy, ewmhints, nitems(ewmhints), False, ewmh);
+}