Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
keep master ratio on resizecol -> arrange
[dwm.git]
/
main.c
diff --git
a/main.c
b/main.c
index
b3c753e
..
53a7c3c
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-19,8
+19,8
@@
char stext[1024];
Bool *seltag;
char stext[1024];
Bool *seltag;
-int bx, by, bw, bh, bmw, m
w
, screen, sx, sy, sw, sh;
-unsigned int ntags, numlockmask;
+int bx, by, bw, bh, bmw, m
asterd
, screen, sx, sy, sw, sh;
+unsigned int
master,
ntags, numlockmask;
Atom wmatom[WMLast], netatom[NetLast];
Bool running = True;
Bool issel = True;
Atom wmatom[WMLast], netatom[NetLast];
Bool running = True;
Bool issel = True;
@@
-38,7
+38,7
@@
static int (*xerrorxlib)(Display *, XErrorEvent *);
static Bool otherwm, readin;
static void
static Bool otherwm, readin;
static void
-cleanup() {
+cleanup(
void
) {
close(STDIN_FILENO);
while(sel) {
resize(sel, True, TopLeft);
close(STDIN_FILENO);
while(sel) {
resize(sel, True, TopLeft);
@@
-58,7
+58,7
@@
cleanup() {
}
static void
}
static void
-scan() {
+scan(
void
) {
unsigned int i, num;
Window *wins, d1, d2;
XWindowAttributes wa;
unsigned int i, num;
Window *wins, d1, d2;
XWindowAttributes wa;
@@
-79,7
+79,7
@@
scan() {
}
static void
}
static void
-setup() {
+setup(
void
) {
int i, j;
unsigned int mask;
Window w;
int i, j;
unsigned int mask;
Window w;
@@
-128,12
+128,15
@@
setup() {
dc.status[ColBG] = getcolor(STATUSBGCOLOR);
dc.status[ColFG] = getcolor(STATUSFGCOLOR);
setfont(FONT);
dc.status[ColBG] = getcolor(STATUSBGCOLOR);
dc.status[ColFG] = getcolor(STATUSFGCOLOR);
setfont(FONT);
-
- bmw = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL);
+
+ bmw = textw(VSTACKSYMBOL) > textw(BSTACKSYMBOL) ?
+ textw(VSTACKSYMBOL) : textw(BSTACKSYMBOL);
+ bmw = bmw > textw(FLOATSYMBOL) ?
+ bmw : textw(FLOATSYMBOL);
sx = sy = 0;
sw = DisplayWidth(dpy, screen);
sh = DisplayHeight(dpy, screen);
sx = sy = 0;
sw = DisplayWidth(dpy, screen);
sh = DisplayHeight(dpy, screen);
- m
w = (sw * MASTERW) / 100
;
+ m
aster = MASTER
;
bx = by = 0;
bw = sw;
bx = by = 0;
bw = sw;