X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=main.c;h=6de4f8ac54f6bc8562851a688d10976aa11ace72;hb=dddd58a8cdc9ffd9f207c45316e9f9a28b4bf519;hp=c6e67e9c72d7e5f97ff9efd317de906acdb7f4ed;hpb=ca65478c8968434c78aacf4a102ccbbe4a66ad9e;p=dwm.git diff --git a/main.c b/main.c index c6e67e9..6de4f8a 100644 --- a/main.c +++ b/main.c @@ -19,12 +19,11 @@ char stext[1024]; Bool *seltag; -int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh; +int bx, by, bw, bh, bmw, master, screen, sx, sy, sw, sh; unsigned int ntags, numlockmask; Atom wmatom[WMLast], netatom[NetLast]; Bool running = True; Bool issel = True; -Bool maximized = False; Client *clients = NULL; Client *sel = NULL; Client *stack = NULL; @@ -39,7 +38,7 @@ static int (*xerrorxlib)(Display *, XErrorEvent *); static Bool otherwm, readin; static void -cleanup() { +cleanup(void) { close(STDIN_FILENO); while(sel) { resize(sel, True, TopLeft); @@ -59,7 +58,7 @@ cleanup() { } static void -scan() { +scan(void) { unsigned int i, num; Window *wins, d1, d2; XWindowAttributes wa; @@ -80,7 +79,7 @@ scan() { } static void -setup() { +setup(void) { int i, j; unsigned int mask; Window w; @@ -129,12 +128,15 @@ setup() { 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); - mw = (sw * MASTERW) / 100; + master = ((stackpos == StackBottom ? sh - bh : sw) * MASTER) / 100; bx = by = 0; bw = sw;