Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
made Layout a static struct in layout.c, added some convenience getters in layout...
[dwm.git]
/
tile.c
diff --git
a/tile.c
b/tile.c
index
40e40e2
..
d03e4fa
100644
(file)
--- a/
tile.c
+++ b/
tile.c
@@
-4,24
+4,23
@@
/* static */
/* static */
-static double m
aster = MASTER
;
+static double m
wfact = MWFACT
;
/* extern */
void
/* extern */
void
-
incmaster
(const char *arg) {
+
addtomwfact
(const char *arg) {
double delta;
double delta;
- if(
lt->arrange != tile
)
+ if(
isarrange(tile)
)
return;
return;
- /* arg handling, manipulate m
aster
*/
+ /* arg handling, manipulate m
wfact
*/
if(arg && (1 == sscanf(arg, "%lf", &delta))) {
if(arg && (1 == sscanf(arg, "%lf", &delta))) {
- if(delta + m
aster > 0.1 && delta + master
< 0.9)
- m
aster
+= delta;
+ if(delta + m
wfact > 0.1 && delta + mwfact
< 0.9)
+ m
wfact
+= delta;
}
}
-
- lt->arrange();
+ arrange();
}
void
}
void
@@
-33,7
+32,7
@@
tile(void) {
n++;
/* window geoms */
n++;
/* window geoms */
- mw = (n == 1) ? waw : m
aster
* waw;
+ mw = (n == 1) ? waw : m
wfact
* waw;
th = (n > 1) ? wah / (n - 1) : 0;
if(n > 1 && th < bh)
th = wah;
th = (n > 1) ? wah / (n - 1) : 0;
if(n > 1 && th < bh)
th = wah;
@@
-42,7
+41,6
@@
tile(void) {
ny = way;
for(i = 0, c = clients; c; c = c->next)
if(isvisible(c)) {
ny = way;
for(i = 0, c = clients; c; c = c->next)
if(isvisible(c)) {
- unban(c);
if(c->isfloating)
continue;
c->ismax = False;
if(c->isfloating)
continue;
c->ismax = False;
@@
-66,17
+64,13
@@
tile(void) {
ny += nh + 2 * c->border;
i++;
}
ny += nh + 2 * c->border;
i++;
}
- else
- ban(c);
- focus(NULL);
- restack();
}
void
zoom(const char *arg) {
Client *c;
}
void
zoom(const char *arg) {
Client *c;
- if(!sel ||
lt->arrange == floating
|| sel->isfloating)
+ if(!sel ||
!isarrange(tile)
|| sel->isfloating)
return;
if((c = sel) == nexttiled(clients))
if(!(c = nexttiled(c->next)))
return;
if((c = sel) == nexttiled(clients))
if(!(c = nexttiled(c->next)))
@@
-84,5
+78,5
@@
zoom(const char *arg) {
detach(c);
attach(c);
focus(c);
detach(c);
attach(c);
focus(c);
-
lt->
arrange();
+ arrange();
}
}