summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2011-09-08 12:00:51 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2011-09-08 12:00:51 +0000
commit071dba74ce834d19696d6c13e856dc416e71f2b1 (patch)
treed08061526d3c0943003bda7face3ac4761175f01 /app
parentb82d763d2657640eed5c052cebcaa3295b51df74 (diff)
reinit menu on reload; from Alexander Polakov. needed for catching
upcoming menu config changes. ok oga@
Diffstat (limited to 'app')
-rw-r--r--app/cwm/conf.c3
-rw-r--r--app/cwm/menu.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index 2cc725185..85e5f0f32 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -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.94 2011/09/03 09:25:39 okan Exp $
+ * $OpenBSD: conf.c,v 1.95 2011/09/08 12:00:49 okan Exp $
*/
#include <sys/param.h>
@@ -100,6 +100,7 @@ conf_reload(struct conf *c)
conf_gap(c, sc);
conf_color(c, sc);
conf_font(c, sc);
+ menu_init(sc);
}
TAILQ_FOREACH(cc, &Clientq, entry)
client_draw_border(cc);
diff --git a/app/cwm/menu.c b/app/cwm/menu.c
index 27f628cb6..79b283d73 100644
--- a/app/cwm/menu.c
+++ b/app/cwm/menu.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: menu.c,v 1.32 2011/07/25 15:41:05 okan Exp $
+ * $OpenBSD: menu.c,v 1.33 2011/09/08 12:00:50 okan Exp $
*/
#include <sys/param.h>
@@ -76,6 +76,8 @@ menu_init(struct screen_ctx *sc)
{
XGCValues gv;
+ if (sc->menuwin)
+ XDestroyWindow(X_Dpy, sc->menuwin);
sc->menuwin = XCreateSimpleWindow(X_Dpy, sc->rootwin, 0, 0, 1, 1,
Conf.bwidth,
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.function = GXxor;
+ if (sc->gc)
+ XFreeGC(X_Dpy, sc->gc);
sc->gc = XCreateGC(X_Dpy, sc->menuwin,
GCForeground|GCBackground|GCFunction, &gv);
}