Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
renamed seltag into seltags
[dwm.git]
/
layout.c
diff --git
a/layout.c
b/layout.c
index
c467080
..
46e82c2
100644
(file)
--- a/
layout.c
+++ b/
layout.c
@@
-94,10
+94,10
@@
void
initlayouts(void) {
unsigned int i, w;
initlayouts(void) {
unsigned int i, w;
- lt = &layout[0];
- nlayouts = sizeof layout
/ sizeof layout
[0];
+ lt = &layout
s
[0];
+ nlayouts = sizeof layout
s / sizeof layouts
[0];
for(blw = i = 0; i < nlayouts; i++) {
for(blw = i = 0; i < nlayouts; i++) {
- w = textw(layout[i].symbol);
+ w = textw(layout
s
[i].symbol);
if(w > blw)
blw = w;
}
if(w > blw)
blw = w;
}
@@
-144,14
+144,14
@@
setlayout(const char *arg) {
if(!arg) {
lt++;
if(!arg) {
lt++;
- if(lt == layout + nlayouts)
- lt = layout;
+ if(lt == layout
s
+ nlayouts)
+ lt = layout
s
;
}
else {
i = atoi(arg);
if(i < 0 || i >= nlayouts)
return;
}
else {
i = atoi(arg);
if(i < 0 || i >= nlayouts)
return;
- lt = &layout[i];
+ lt = &layout
s
[i];
}
if(sel)
arrange();
}
if(sel)
arrange();