mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
cvsimport
This commit is contained in:
28
conf.c
28
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user