diff options
author | okan <okan> | 2013-06-20 02:33:57 +0000 |
---|---|---|
committer | okan <okan> | 2013-06-20 02:33:57 +0000 |
commit | 9a12ca3520e1f8d5673755d0dbe73e9d94bdbc79 (patch) | |
tree | 1f679799de165046b7704886b55cde893eff0cc1 /conf.c | |
parent | c30653b1c34cff7ca527e15918595e8bea6941c3 (diff) | |
parent | 7004700ce0b216f4ea4bb84043acb311928c9a6d (diff) | |
download | cwm-9a12ca3520e1f8d5673755d0dbe73e9d94bdbc79.tar.gz cwm-9a12ca3520e1f8d5673755d0dbe73e9d94bdbc79.tar.xz cwm-9a12ca3520e1f8d5673755d0dbe73e9d94bdbc79.zip |
cvsimport
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/conf.c b/conf.c index 7c4f77d..c6cc3bd 100644 --- a/conf.c +++ b/conf.c @@ -121,7 +121,7 @@ conf_screen(struct screen_ctx *sc) } } if (i == CWM_COLOR_MAX) - return; + goto out; xu_xorcolor(sc->xftcolor[CWM_COLOR_MENU_BG], sc->xftcolor[CWM_COLOR_MENU_FG], &xc); @@ -129,7 +129,7 @@ conf_screen(struct screen_ctx *sc) if (!XftColorAllocValue(X_Dpy, sc->visual, sc->colormap, &xc.color, &sc->xftcolor[CWM_COLOR_MENU_FONT_SEL])) warnx("XftColorAllocValue: '%s'", Conf.color[i]); - +out: sc->menuwin = XCreateSimpleWindow(X_Dpy, sc->rootwin, 0, 0, 1, 1, Conf.bwidth, sc->xftcolor[CWM_COLOR_MENU_FG].pixel, @@ -545,7 +545,9 @@ static struct { { "menu_cmd", mousefunc_menu_cmd, MOUSEBIND_CTX_ROOT }, }; -static unsigned int mouse_btns[] = { Button1, Button2, Button3 }; +static unsigned int mouse_btns[] = { + Button1, Button2, Button3, Button4, Button5 +}; int conf_mousebind(struct conf *c, char *name, char *binding) @@ -571,7 +573,7 @@ conf_mousebind(struct conf *c, char *name, char *binding) } else substring = name; - button = strtonum(substring, 1, 3, &errstr); + button = strtonum(substring, 1, 5, &errstr); if (errstr) warnx("button number is %s: %s", errstr, substring); @@ -623,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) { @@ -645,4 +664,3 @@ conf_grab_kbd(Window win) TAILQ_FOREACH(kb, &Conf.keybindingq, entry) xu_key_grab(win, kb->modmask, kb->keysym); } - |