From: Marco Peereboom Date: Thu, 1 Jul 2010 21:13:02 +0000 (+0000) Subject: Go borderless when bar is disabled and there is only 1 window on screen X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;ds=inline;h=63f6779ee0a5d8458a290284c233767788892448;p=spectrwm.git Go borderless when bar is disabled and there is only 1 window on screen from the arch linux folks --- diff --git a/scrotwm.c b/scrotwm.c index 2757863..9f6d7ff 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -2113,7 +2113,12 @@ stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip) win_g.y += last_h + 2; bzero(&wc, sizeof wc); - wc.border_width = 1; + if (bar_enabled == 0 && winno == 1){ + wc.border_width = 0; + win_g.w += 2; + win_g.h += 2; + } else + wc.border_width = 1; reconfigure = 0; if (rot) { if (win->g.x != win_g.y || win->g.y != win_g.x || @@ -2294,11 +2299,17 @@ max_stack(struct workspace *ws, struct swm_geometry *g) if (win->g.x != gg.x || win->g.y != gg.y || win->g.w != gg.w || win->g.h != gg.h) { bzero(&wc, sizeof wc); - wc.border_width = 1; win->g.x = wc.x = gg.x; win->g.y = wc.y = gg.y; - win->g.w = wc.width = gg.w; - win->g.h = wc.height = gg.h; + if (bar_enabled){ + wc.border_width = 1; + win->g.w = wc.width = gg.w; + win->g.h = wc.height = gg.h; + } else { + wc.border_width = 0; + win->g.w = wc.width = gg.w + 2; + win->g.h = wc.height = gg.h + 2; + } mask = CWX | CWY | CWWidth | CWHeight | CWBorderWidth; XConfigureWindow(display, win->id, mask, &wc); configreq_win(win);