blw/bgw calculation bugfix
e6ede461
1 file(s) · +7 −7
| 1448 | 1448 | ||
| 1449 | 1449 | void |
|
| 1450 | 1450 | setup(void) { |
|
| 1451 | - | unsigned int i; |
|
| 1451 | + | unsigned int i, w; |
|
| 1452 | 1452 | XSetWindowAttributes wa; |
|
| 1453 | 1453 | ||
| 1454 | 1454 | /* init screen */ |
|
| 1503 | 1503 | ||
| 1504 | 1504 | /* init bar */ |
|
| 1505 | 1505 | for(blw = i = 0; i < LENGTH(layouts); i++) { |
|
| 1506 | - | i = textw(layouts[i].symbol); |
|
| 1507 | - | if(i > blw) |
|
| 1508 | - | blw = i; |
|
| 1506 | + | w = textw(layouts[i].symbol); |
|
| 1507 | + | if(w > blw) |
|
| 1508 | + | blw = w; |
|
| 1509 | 1509 | } |
|
| 1510 | 1510 | for(bgw = i = 0; i < LENGTH(geoms); i++) { |
|
| 1511 | - | i = textw(geoms[i].symbol); |
|
| 1512 | - | if(i > bgw) |
|
| 1513 | - | bgw = i; |
|
| 1511 | + | w = textw(geoms[i].symbol); |
|
| 1512 | + | if(w > bgw) |
|
| 1513 | + | bgw = w; |
|
| 1514 | 1514 | } |
|
| 1515 | 1515 | ||
| 1516 | 1516 | wa.override_redirect = 1; |
|