mirror of https://github.com/0intro/wmii
made the class/instance fetching more failsafe
This commit is contained in:
parent
61ad8e0f98
commit
4d7f8725ee
|
@ -39,8 +39,12 @@ alloc_client(Window w, XWindowAttributes *wa)
|
|||
free(name.value);
|
||||
}
|
||||
if(XGetClassHint(dpy, c->win, &ch)) {
|
||||
snprintf(c->classinst, sizeof(c->classinst), "%s:%s", ch.res_class, ch.res_name);
|
||||
ch.res_class = ch.res_name = nil;
|
||||
snprintf(c->classinst, sizeof(c->classinst), "%s:%s",
|
||||
ch.res_class ? ch.res_class : "", ch.res_name ? ch.res_name : "");
|
||||
if(ch.res_class)
|
||||
XFree(ch.res_class);
|
||||
if(ch.res_name)
|
||||
XFree(ch.res_name);
|
||||
}
|
||||
fwa.override_redirect = 1;
|
||||
|
|
12
cmd/wm/kb.c
12
cmd/wm/kb.c
|
@ -267,3 +267,15 @@ kid2index(unsigned short id)
|
|||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
update_keys()
|
||||
{
|
||||
unsigned int i;
|
||||
for(i = 0; i < nkey; i++) {
|
||||
ungrab_key(key[i]);
|
||||
grab_key(key[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue