X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=93b42444d8c7607ead1ca7a118ff7e9d1696d2d3;hb=519aa00149f17f00cc7067c2b957e3639b8411f5;hp=1e205629f17ef33e09bc5ebed37c7e7abacfa722;hpb=cfe055c6fc663ae4f4ab2520ba076c2409552dac;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index 1e20562..93b4244 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -1989,12 +1989,12 @@ bar_window_name(char *s, size_t sz, struct swm_region *r) free(title); } -int urgent[SWM_WS_MAX]; void bar_urgent(char *s, size_t sz) { struct ws_win *win; int i, j, num_screens; + int urgent[SWM_WS_MAX]; char b[8]; xcb_get_property_cookie_t c; xcb_icccm_wm_hints_t hints; @@ -4259,20 +4259,24 @@ stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip) colno = (winno - mwin) / stacks; if (s <= (winno - mwin) % stacks) colno++; - split = split + colno; - hrh = (r_g.h / colno); + split += colno; + hrh = r_g.h / colno; extra = r_g.h - (colno * hrh); - if (flip) - win_g.x = r_g.x; - else + + if (!flip) win_g.x += win_g.w + 2 * border_width + tile_gap; + win_g.w = (r_g.w - msize - (stacks * (2 * border_width + tile_gap))) / stacks; if (s == 1) win_g.w += (r_g.w - msize - (stacks * (2 * border_width + tile_gap))) % stacks; + + if (flip) + win_g.x -= win_g.w + 2 * border_width + + tile_gap; s--; j = 0; }