diff options
author | okan | 2013-06-17 17:11:10 +0000 |
---|---|---|
committer | okan | 2013-06-17 17:11:10 +0000 |
commit | 44880fc9e1b308e5fdd1070fbd2d7fd012b1dc75 (patch) | |
tree | 8c660ca028101e2dd039988fef2c9d08764e5f6b /conf.c | |
parent | 99bf11e128ef433ba54ef1899d937d2f99f9069b (diff) | |
download | cwm-44880fc9e1b308e5fdd1070fbd2d7fd012b1dc75.tar.gz |
move Cursors into conf.
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -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. * - * $OpenBSD: conf.c,v 1.134 2013/06/17 00:57:47 okan Exp $ + * $OpenBSD: conf.c,v 1.135 2013/06/17 17:11:10 okan Exp $ */ #include <sys/param.h> @@ -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); } - |