mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
reinit menu on reload; from Alexander Polakov. needed for catching
upcoming menu config changes. ok oga@
This commit is contained in:
parent
d85b3adc0c
commit
840323558d
1
conf.c
1
conf.c
@ -100,6 +100,7 @@ conf_reload(struct conf *c)
|
|||||||
conf_gap(c, sc);
|
conf_gap(c, sc);
|
||||||
conf_color(c, sc);
|
conf_color(c, sc);
|
||||||
conf_font(c, sc);
|
conf_font(c, sc);
|
||||||
|
menu_init(sc);
|
||||||
}
|
}
|
||||||
TAILQ_FOREACH(cc, &Clientq, entry)
|
TAILQ_FOREACH(cc, &Clientq, entry)
|
||||||
client_draw_border(cc);
|
client_draw_border(cc);
|
||||||
|
4
menu.c
4
menu.c
@ -76,6 +76,8 @@ menu_init(struct screen_ctx *sc)
|
|||||||
{
|
{
|
||||||
XGCValues gv;
|
XGCValues gv;
|
||||||
|
|
||||||
|
if (sc->menuwin)
|
||||||
|
XDestroyWindow(X_Dpy, sc->menuwin);
|
||||||
sc->menuwin = XCreateSimpleWindow(X_Dpy, sc->rootwin, 0, 0, 1, 1,
|
sc->menuwin = XCreateSimpleWindow(X_Dpy, sc->rootwin, 0, 0, 1, 1,
|
||||||
Conf.bwidth,
|
Conf.bwidth,
|
||||||
sc->color[CWM_COLOR_FG_MENU].pixel,
|
sc->color[CWM_COLOR_FG_MENU].pixel,
|
||||||
@ -86,6 +88,8 @@ menu_init(struct screen_ctx *sc)
|
|||||||
gv.background = sc->color[CWM_COLOR_BG_MENU].pixel;
|
gv.background = sc->color[CWM_COLOR_BG_MENU].pixel;
|
||||||
gv.function = GXxor;
|
gv.function = GXxor;
|
||||||
|
|
||||||
|
if (sc->gc)
|
||||||
|
XFreeGC(X_Dpy, sc->gc);
|
||||||
sc->gc = XCreateGC(X_Dpy, sc->menuwin,
|
sc->gc = XCreateGC(X_Dpy, sc->menuwin,
|
||||||
GCForeground|GCBackground|GCFunction, &gv);
|
GCForeground|GCBackground|GCFunction, &gv);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user