Fix fullscreen

This commit is contained in:
Przemek Grondek 2021-11-13 02:03:43 +01:00
parent 75a4d98edc
commit bb6ccde971
2 changed files with 10 additions and 2 deletions

10
dwm.c
View File

@ -1538,6 +1538,14 @@ resizeclient(Client *c, int x, int y, int w, int h)
c->oldw = c->w; c->w = wc.width = w; c->oldw = c->w; c->w = wc.width = w;
c->oldh = c->h; c->h = wc.height = h; c->oldh = c->h; c->h = wc.height = h;
wc.border_width = c->bw; wc.border_width = c->bw;
if(selmon->showbar) {
} else {
wc.border_width = 0;
c->w = wc.width += c->bw * 2;
c->h = wc.height += c->bw * 2;
}
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c); configure(c);
XSync(dpy, False); XSync(dpy, False);
@ -1792,7 +1800,7 @@ fullscreen(const Arg *arg)
{ {
if (selmon->showbar) { if (selmon->showbar) {
for(last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++); for(last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++);
setlayout(&((Arg) { .v = &layouts[2] })); setlayout(&((Arg) { .v = &layouts[3] }));
} else { } else {
setlayout(&((Arg) { .v = last_layout })); setlayout(&((Arg) { .v = last_layout }));
} }