comparison tag.c @ 80:8125f908c80c

several additions in mouse handling ;)
author Anselm R. Garbe <garbeam@wmii.de>
date Sun, 16 Jul 2006 00:47:40 +0200
parents 4bd49f404f10
children 052fe7498930
comparison
equal deleted inserted replaced
79:aabebd6e61f3 80:8125f908c80c
15 [Twww] = "www", 15 [Twww] = "www",
16 [Twork] = "work", 16 [Twork] = "work",
17 }; 17 };
18 18
19 static Rule rule[] = { 19 static Rule rule[] = {
20 /* class instance tags dofloat */ 20 /* class instance tags isfloat */
21 { "Firefox-bin", "Gecko", { [Twww] = "www" }, False }, 21 { "Firefox-bin", "Gecko", { [Twww] = "www" }, False },
22 }; 22 };
23 23
24 /********** CUSTOMIZE **********/ 24 /********** CUSTOMIZE **********/
25 25
65 int n, i, w, h; 65 int n, i, w, h;
66 66
67 w = sw - mw; 67 w = sw - mw;
68 arrange = dotile; 68 arrange = dotile;
69 for(n = 0, c = clients; c; c = c->next) 69 for(n = 0, c = clients; c; c = c->next)
70 if(c->tags[tsel] && !c->dofloat) 70 if(c->tags[tsel] && !c->isfloat)
71 n++; 71 n++;
72 72
73 if(n > 1) 73 if(n > 1)
74 h = (sh - bh) / (n - 1); 74 h = (sh - bh) / (n - 1);
75 else 75 else
76 h = sh - bh; 76 h = sh - bh;
77 77
78 for(i = 0, c = clients; c; c = c->next) { 78 for(i = 0, c = clients; c; c = c->next) {
79 if(c->tags[tsel]) { 79 if(c->tags[tsel]) {
80 if(c->dofloat) { 80 if(c->isfloat) {
81 higher(c); 81 higher(c);
82 resize(c, True); 82 resize(c, True);
83 continue; 83 continue;
84 } 84 }
85 if(n == 1) { 85 if(n == 1) {
153 if(!strncmp(rule[i].class, ch.res_class, sizeof(rule[i].class)) 153 if(!strncmp(rule[i].class, ch.res_class, sizeof(rule[i].class))
154 && !strncmp(rule[i].instance, ch.res_name, sizeof(rule[i].instance))) 154 && !strncmp(rule[i].instance, ch.res_name, sizeof(rule[i].instance)))
155 { 155 {
156 for(j = 0; j < TLast; j++) 156 for(j = 0; j < TLast; j++)
157 c->tags[j] = rule[i].tags[j]; 157 c->tags[j] = rule[i].tags[j];
158 c->dofloat = rule[i].dofloat; 158 c->isfloat = rule[i].isfloat;
159 matched = True; 159 matched = True;
160 break; 160 break;
161 } 161 }
162 } 162 }
163 if(ch.res_class) 163 if(ch.res_class)