diff --git a/config.h b/config.h index 51ae1a9..e1a38e4 100644 --- a/config.h +++ b/config.h @@ -127,7 +127,6 @@ */ #define ALWAYSDRAW {\ - "cmapcube", \ 0 \ } diff --git a/fns.h b/fns.h index cced2bf..7e88fa1 100644 --- a/fns.h +++ b/fns.h @@ -60,6 +60,7 @@ void setstate(); void setlabel(); void getproto(); void gettrans(); +int shouldalwaysdraw(Client* c); /* key.c */ void keypress(); diff --git a/manage.c b/manage.c index 8ae4f16..1e2fa8d 100644 --- a/manage.c +++ b/manage.c @@ -44,7 +44,11 @@ int manage(Client* c, int mapped) { if (XGetClassHint(dpy, c->window, &class) != 0) { /* ``Success'' */ c->instance = class.res_name; c->class = class.res_class; +#ifdef ALWAYSDRAW + c->is9term = shouldalwaysdraw(c); +#else c->is9term = 0; +#endif if (isNew) { c->is9term = strstr(c->class, "term") || strstr(c->class, "Term") || strstr(c->class, "urxvt") || strstr(c->class, "URxvt") || @@ -554,3 +558,18 @@ void getproto(Client* c) { XFree((char*)p); } + +#ifdef ALWAYSDRAW +int shouldalwaysdraw(Client* c) { + static char* alwaysdraw[] = ALWAYSDRAW; + char** a = alwaysdraw; + + while (*a) { + if (c && c->class && strstr(c->class, *a)) { + return 1; + } + ++a; + } + return 0; +} +#endif