summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authorokan <okan>2013-06-17 17:11:10 +0000
committerokan <okan>2013-06-17 17:11:10 +0000
commit234b8214df298740b37ad566771a9df2f1b3aec6 (patch)
treee7379452f7f424b6a8d44be6b6bfd4c9ee728b90 /conf.c
parent23d84adb5ed6cc3890fb1d74d4d5a43004b0ea0d (diff)
downloadcwm-234b8214df298740b37ad566771a9df2f1b3aec6.tar.gz
cwm-234b8214df298740b37ad566771a9df2f1b3aec6.tar.xz
cwm-234b8214df298740b37ad566771a9df2f1b3aec6.zip
move Cursors into conf.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 6b0abe6..6725f4b 100644
--- a/conf.c
+++ b/conf.c
@@ -625,6 +625,23 @@ conf_mouseunbind(struct conf *c, struct mousebinding *unbind)
 	}
 }
 
+static int cursor_binds[CF_NITEMS] = {
+	XC_X_cursor,		/* CF_DEFAULT */
+	XC_fleur,		/* CF_MOVE */
+	XC_left_ptr,		/* CF_NORMAL */
+	XC_question_arrow,	/* CF_QUESTION */
+	XC_bottom_right_corner,	/* CF_RESIZE */
+};
+
+void
+conf_cursor(struct conf *c)
+{
+	u_int	 i;
+
+	for (i = 0; i < nitems(cursor_binds); i++)
+		c->cursor[i] = XCreateFontCursor(X_Dpy, cursor_binds[i]);
+}
+
 void
 conf_grab_mouse(Window win)
 {
@@ -647,4 +664,3 @@ conf_grab_kbd(Window win)
 	TAILQ_FOREACH(kb, &Conf.keybindingq, entry)
 		xu_key_grab(win, kb->modmask, kb->keysym);
 }
-