Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
other color
[dwm.git]
/
tile.c
diff --git
a/tile.c
b/tile.c
index
b7cc100
..
56a06d3
100644
(file)
--- a/
tile.c
+++ b/
tile.c
@@
-9,16
+9,23
@@
static double mwfact = MWFACT;
/* extern */
void
/* extern */
void
-
addto
mwfact(const char *arg) {
+
set
mwfact(const char *arg) {
double delta;
double delta;
- if(isarrange(tile))
+ if(
!
isarrange(tile))
return;
return;
-
/* arg handling, manipulate mwfact */
/* arg handling, manipulate mwfact */
- if(arg && (1 == sscanf(arg, "%lf", &delta))) {
- if(delta + mwfact > 0.1 && delta + mwfact < 0.9)
+ if(arg == NULL)
+ mwfact = MWFACT;
+ else if(1 == sscanf(arg, "%lf", &delta)) {
+ if(arg[0] != '+' && arg[0] != '-')
+ mwfact = delta;
+ else
mwfact += delta;
mwfact += delta;
+ if(mwfact < 0.1)
+ mwfact = 0.1;
+ else if(mwfact > 0.9)
+ mwfact = 0.9;
}
arrange();
}
}
arrange();
}
@@
-39,7
+46,7
@@
tile(void) {
nx = wax;
ny = way;
nx = wax;
ny = way;
- for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) {
+ for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)
, i++
) {
c->ismax = False;
if(i == 0) { /* master */
nw = mw - 2 * c->border;
c->ismax = False;
if(i == 0) { /* master */
nw = mw - 2 * c->border;
@@
-56,10
+63,9
@@
tile(void) {
else
nh = th - 2 * c->border;
}
else
nh = th - 2 * c->border;
}
- resize(c, nx, ny, nw, nh,
False
);
+ resize(c, nx, ny, nw, nh,
RESIZEHINTS
);
if(n > 1 && th != wah)
ny += nh + 2 * c->border;
if(n > 1 && th != wah)
ny += nh + 2 * c->border;
- i++;
}
}
}
}