mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
replace conf_{gap,color,font} with conf_screen since really we are
configuring the screen *after* parsing, just as we do a conf_client on client manage.
This commit is contained in:
parent
9b9e95d742
commit
3a38686137
4
calmwm.h
4
calmwm.h
@ -439,14 +439,12 @@ void conf_bindname(struct conf *, char *, char *);
|
|||||||
void conf_clear(struct conf *);
|
void conf_clear(struct conf *);
|
||||||
void conf_client(struct client_ctx *);
|
void conf_client(struct client_ctx *);
|
||||||
void conf_cmd_add(struct conf *, char *, char *);
|
void conf_cmd_add(struct conf *, char *, char *);
|
||||||
void conf_color(struct conf *, struct screen_ctx *);
|
|
||||||
void conf_font(struct conf *, struct screen_ctx *);
|
|
||||||
void conf_gap(struct conf *, struct screen_ctx *);
|
|
||||||
void conf_grab(struct conf *, struct keybinding *);
|
void conf_grab(struct conf *, struct keybinding *);
|
||||||
void conf_grab_mouse(struct client_ctx *);
|
void conf_grab_mouse(struct client_ctx *);
|
||||||
void conf_init(struct conf *);
|
void conf_init(struct conf *);
|
||||||
void conf_ignore(struct conf *, char *);
|
void conf_ignore(struct conf *, char *);
|
||||||
void conf_mousebind(struct conf *, char *, char *);
|
void conf_mousebind(struct conf *, char *, char *);
|
||||||
|
void conf_screen(struct screen_ctx *);
|
||||||
void conf_ungrab(struct conf *, struct keybinding *);
|
void conf_ungrab(struct conf *, struct keybinding *);
|
||||||
|
|
||||||
void font_draw(struct screen_ctx *, const char *, int,
|
void font_draw(struct screen_ctx *, const char *, int,
|
||||||
|
20
conf.c
20
conf.c
@ -84,18 +84,6 @@ conf_ignore(struct conf *c, char *val)
|
|||||||
TAILQ_INSERT_TAIL(&c->ignoreq, wm, entry);
|
TAILQ_INSERT_TAIL(&c->ignoreq, wm, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
conf_gap(struct conf *c, struct screen_ctx *sc)
|
|
||||||
{
|
|
||||||
sc->gap = c->gap;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
conf_font(struct conf *c, struct screen_ctx *sc)
|
|
||||||
{
|
|
||||||
font_init(sc, c->font, (const char **)c->menucolor);
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *menu_color_binds[CWM_COLOR_MENU_MAX] = {
|
static char *menu_color_binds[CWM_COLOR_MENU_MAX] = {
|
||||||
"black", /* CWM_COLOR_MENU_FG */
|
"black", /* CWM_COLOR_MENU_FG */
|
||||||
"white", /* CWM_COLOR_MENU_BG */
|
"white", /* CWM_COLOR_MENU_BG */
|
||||||
@ -111,12 +99,16 @@ static char *color_binds[CWM_COLOR_BORDER_MAX] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
conf_color(struct conf *c, struct screen_ctx *sc)
|
conf_screen(struct screen_ctx *sc)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
sc->gap = Conf.gap;
|
||||||
|
|
||||||
|
font_init(sc, Conf.font, (const char **)Conf.menucolor);
|
||||||
|
|
||||||
for (i = 0; i < CWM_COLOR_BORDER_MAX; i++)
|
for (i = 0; i < CWM_COLOR_BORDER_MAX; i++)
|
||||||
sc->color[i] = xu_getcolor(sc, c->color[i]);
|
sc->color[i] = xu_getcolor(sc, Conf.color[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
|
4
screen.c
4
screen.c
@ -49,9 +49,7 @@ screen_init(int which)
|
|||||||
xu_ewmh_net_supported(sc);
|
xu_ewmh_net_supported(sc);
|
||||||
xu_ewmh_net_supported_wm_check(sc);
|
xu_ewmh_net_supported_wm_check(sc);
|
||||||
|
|
||||||
conf_gap(&Conf, sc);
|
conf_screen(sc);
|
||||||
conf_color(&Conf, sc);
|
|
||||||
conf_font(&Conf, sc);
|
|
||||||
|
|
||||||
screen_update_geometry(sc);
|
screen_update_geometry(sc);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user