- XClassHint ch;
- static unsigned int len = rule ? sizeof(rule) / sizeof(rule[0]) : 0;
- unsigned int i, j;
- Bool matched = False;
-
- if(!len) {
- c->tags[tsel] = tags[tsel];
- return;
- }
-
- if(XGetClassHint(dpy, c->win, &ch)) {
- if(ch.res_class && ch.res_name) {
- fprintf(stderr, "%s:%s\n", ch.res_class, ch.res_name);
- for(i = 0; i < len; i++)
- if(!strncmp(rule[i].class, ch.res_class, sizeof(rule[i].class))
- && !strncmp(rule[i].instance, ch.res_name, sizeof(rule[i].instance)))
- {
- fprintf(stderr, "->>>%s:%s\n", ch.res_class, ch.res_name);
- for(j = 0; j < TLast; j++)
- c->tags[j] = rule[i].tags[j];
- matched = True;
- break;
- }
- }
- if(ch.res_class)
- XFree(ch.res_class);
- if(ch.res_name)
- XFree(ch.res_name);
- }
-
- if(!matched)
- c->tags[tsel] = tags[tsel];
+ XLowerWindow(dpy, c->title);
+ XLowerWindow(dpy, c->win);