equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
3 * See LICENSE file for license details. |
3 * See LICENSE file for license details. |
4 */ |
4 */ |
5 #include "dwm.h" |
5 #include "dwm.h" |
6 |
|
7 #include <regex.h> |
6 #include <regex.h> |
8 #include <stdio.h> |
7 #include <stdio.h> |
9 #include <string.h> |
8 #include <string.h> |
10 #include <sys/types.h> |
9 #include <sys/types.h> |
11 #include <X11/Xutil.h> |
10 #include <X11/Xutil.h> |
84 continue; |
83 continue; |
85 } |
84 } |
86 if(n == 1) { |
85 if(n == 1) { |
87 c->x = sx; |
86 c->x = sx; |
88 c->y = sy + bh; |
87 c->y = sy + bh; |
89 c->w = sw - 2 * c->border; |
88 c->w = sw - 2; |
90 c->h = sh - 2 * c->border - bh; |
89 c->h = sh - 2 - bh; |
91 } |
90 } |
92 else if(i == 0) { |
91 else if(i == 0) { |
93 c->x = sx; |
92 c->x = sx; |
94 c->y = sy + bh; |
93 c->y = sy + bh; |
95 c->w = mw - 2 * c->border; |
94 c->w = mw - 2; |
96 c->h = sh - 2 * c->border - bh; |
95 c->h = sh - 2 - bh; |
97 } |
96 } |
98 else if(h > bh) { |
97 else if(h > bh) { |
99 c->x = sx + mw; |
98 c->x = sx + mw; |
100 c->y = sy + (i - 1) * h + bh; |
99 c->y = sy + (i - 1) * h + bh; |
101 c->w = w - 2 * c->border; |
100 c->w = w - 2; |
102 c->h = h - 2 * c->border; |
101 c->h = h - 2; |
103 } |
102 } |
104 else { /* fallback if h < bh */ |
103 else { /* fallback if h < bh */ |
105 c->x = sx + mw; |
104 c->x = sx + mw; |
106 c->y = sy + bh; |
105 c->y = sy + bh; |
107 c->w = w - 2 * c->border; |
106 c->w = w - 2; |
108 c->h = sh - 2 * c->border - bh; |
107 c->h = sh - 2 - bh; |
109 } |
108 } |
110 resize(c, False, TopLeft); |
109 resize(c, False, TopLeft); |
111 i++; |
110 i++; |
112 } |
111 } |
113 else |
112 else |