Introduction
Introduction Statistics Contact Development Disclaimer Help
tmark broken clients as broken - dwm - [fork] customized build of dwm, the dyna…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 8dc9fcf1b95db927ce50a63c7e571fdb074529e8
parent fc21dd4b7e65bb511ac10f8bd8f469fe0f00a76e
Author: [email protected] <unknown>
Date: Sun, 12 Jul 2009 22:49:06 +0100
mark broken clients as broken
Diffstat:
M dwm.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/dwm.c b/dwm.c
t@@ -237,6 +237,7 @@ static int xerrorstart(Display *dpy, XErrorEvent *ee);
static void zoom(const Arg *arg);
/* variables */
+static const char broken[] = "broken";
static char stext[256], ntext[8];
static int screen;
static int sw, sh; /* X display screen geometry width, height */
t@@ -275,6 +276,7 @@ struct NumTags { char limitexceeded[sizeof(unsigned int) *…
/* function implementations */
void
applyrules(Client *c) {
+ const char *class, *instance;
unsigned int i;
const Rule *r;
Monitor *m;
t@@ -283,11 +285,13 @@ applyrules(Client *c) {
/* rule matching */
c->isfloating = c->tags = 0;
if(XGetClassHint(dpy, c->win, &ch)) {
+ class = ch.res_class ? ch.res_class : broken;
+ instance = ch.res_name ? ch.res_name : broken;
for(i = 0; i < LENGTH(rules); i++) {
r = &rules[i];
if((!r->title || strstr(c->name, r->title))
- && (!r->class || (ch.res_class && strstr(ch.res_class,…
- && (!r->instance || (ch.res_name && strstr(ch.res_name…
+ && (!r->class || strstr(class, r->class))
+ && (!r->instance || strstr(instance, r->instance)))
{
c->isfloating = r->isfloating;
c->tags |= r->tags;
t@@ -1819,6 +1823,8 @@ void
updatetitle(Client *c) {
if(!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name))
gettextprop(c->win, XA_WM_NAME, c->name, sizeof c->name);
+ if(c->name[0] == '\0') /* hack to mark broken clients */
+ strcpy(c->name, broken);
}
void
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.