diff options
Diffstat (limited to '')
| -rw-r--r-- | layout.c | 18 |
1 files changed, 12 insertions, 6 deletions
| @@ -120,11 +120,17 @@ incmasterw(const char *arg) { | |||
| 120 | 120 | ||
| 121 | void | 121 | void |
| 122 | incnmaster(const char *arg) { | 122 | incnmaster(const char *arg) { |
| 123 | int i = arg ? atoi(arg) : 0; | 123 | int i; |
| 124 | if((lt->arrange != tile) || (nmaster + i < 1) | 124 | |
| 125 | || (wah / (nmaster + i) <= 2 * BORDERPX)) | 125 | if(!arg) |
| 126 | return; | 126 | nmaster = NMASTER; |
| 127 | nmaster += i; | 127 | else { |
| 128 | i = atoi(arg); | ||
| 129 | if((lt->arrange != tile) || (nmaster + i < 1) | ||
| 130 | || (wah / (nmaster + i) <= 2 * BORDERPX)) | ||
| 131 | return; | ||
| 132 | nmaster += i; | ||
| 133 | } | ||
| 128 | if(sel) | 134 | if(sel) |
| 129 | lt->arrange(); | 135 | lt->arrange(); |
| 130 | else | 136 | else |
| @@ -175,7 +181,7 @@ restack(void) { | |||
| 175 | 181 | ||
| 176 | void | 182 | void |
| 177 | setlayout(const char *arg) { | 183 | setlayout(const char *arg) { |
| 178 | unsigned int i; | 184 | int i; |
| 179 | 185 | ||
| 180 | if(!arg) { | 186 | if(!arg) { |
| 181 | for(i = 0; i < nlayouts && lt != &layout[i]; i++); | 187 | for(i = 0; i < nlayouts && lt != &layout[i]; i++); |
