equal
deleted
inserted
replaced
232 Window root, barwin; |
232 Window root, barwin; |
233 |
233 |
234 /* configuration, allows nested code to access above variables */ |
234 /* configuration, allows nested code to access above variables */ |
235 #include "config.h" |
235 #include "config.h" |
236 |
236 |
237 /* check if all tags will fit into a uint bitarray. */ |
237 /* compile-time check if all tags fit into an uint bit array. */ |
238 static char tags_is_a_sign_that_your_IQ[sizeof(int) * 8 < LENGTH(tags) ? -1 : 1]; |
238 struct NumTags { char limitexceeded[sizeof(uint) * 8 < LENGTH(tags) ? -1 : 1]; }; |
239 |
239 |
240 /* function implementations */ |
240 /* function implementations */ |
241 |
|
242 void |
241 void |
243 applyrules(Client *c) { |
242 applyrules(Client *c) { |
244 uint i; |
243 uint i; |
245 Rule *r; |
244 Rule *r; |
246 XClassHint ch = { 0 }; |
245 XClassHint ch = { 0 }; |
1546 drawbar(); |
1545 drawbar(); |
1547 } |
1546 } |
1548 |
1547 |
1549 void |
1548 void |
1550 toggletag(const void *arg) { |
1549 toggletag(const void *arg) { |
1551 int i, m = *(int *)arg; |
|
1552 for(i = 0; i < sizeof(int) * 8; i++) |
|
1553 fputc(m & 1 << i ? '1' : '0', stdout); |
|
1554 puts(""); |
|
1555 for(i = 0; i < sizeof(int) * 8; i++) |
|
1556 fputc(TAGMASK & 1 << i ? '1' : '0', stdout); |
|
1557 puts("aaa"); |
|
1558 |
|
1559 if(sel && (sel->tags ^ ((*(int *)arg) & TAGMASK))) { |
1550 if(sel && (sel->tags ^ ((*(int *)arg) & TAGMASK))) { |
1560 sel->tags ^= (*(int *)arg) & TAGMASK; |
1551 sel->tags ^= (*(int *)arg) & TAGMASK; |
1561 arrange(); |
1552 arrange(); |
1562 } |
1553 } |
1563 } |
1554 } |