From be72620432190a8919f257d0734ef9ee96b86cfc Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 14 May 2013 13:39:53 +0000 Subject: if -> ifdef --- calmwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calmwm.c') diff --git a/calmwm.c b/calmwm.c index 7bc204a..e9b3902 100644 --- a/calmwm.c +++ b/calmwm.c @@ -181,7 +181,7 @@ x_wmerrorhandler(Display *dpy, XErrorEvent *e) static int x_errorhandler(Display *dpy, XErrorEvent *e) { -#if DEBUG +#ifdef DEBUG char msg[80], number[80], req[80]; XGetErrorText(X_Dpy, e->error_code, msg, sizeof(msg)); -- cgit 1.4.1 From d1eadee9226043af0e2a7043a958e6c4d8e405bc Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 22 May 2013 16:54:09 +0000 Subject: get rid of long standing XXX: now that we configure screens based on config options, add the keybinding GrabKey calls here --- calmwm.c | 8 -------- conf.c | 8 ++++++-- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'calmwm.c') diff --git a/calmwm.c b/calmwm.c index e9b3902..f2dff49 100644 --- a/calmwm.c +++ b/calmwm.c @@ -144,7 +144,6 @@ dpy_init(const char *dpyname) static void x_setup(void) { - struct keybinding *kb; int i; Cursor_default = XCreateFontCursor(X_Dpy, XC_X_cursor); @@ -155,13 +154,6 @@ x_setup(void) for (i = 0; i < ScreenCount(X_Dpy); i++) screen_init(i); - - /* - * XXX key grabs weren't done before, since Screenq was empty, - * do them here for now (this needs changing). - */ - TAILQ_FOREACH(kb, &Conf.keybindingq, entry) - conf_grab(&Conf, kb); } static void diff --git a/conf.c b/conf.c index 0afc11d..b3c5210 100644 --- a/conf.c +++ b/conf.c @@ -98,8 +98,9 @@ static char *color_binds[CWM_COLOR_MAX] = { void conf_screen(struct screen_ctx *sc) { - int i; - XftColor xc; + struct keybinding *kb; + int i; + XftColor xc; sc->gap = Conf.gap; @@ -139,6 +140,9 @@ conf_screen(struct screen_ctx *sc) sc->visual, sc->colormap); if (sc->xftdraw == NULL) errx(1, "XftDrawCreate"); + + TAILQ_FOREACH(kb, &Conf.keybindingq, entry) + xu_key_grab(sc->rootwin, kb->modmask, kb->keysym); } static struct { -- cgit 1.4.1