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

View File

@ -23,7 +23,7 @@ static const unsigned int snap = 32; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static const int showsystray = 1; /* 0 means no systray */
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "monospace:size=10" };

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->oldh = c->h; c->h = wc.height = h;
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);
configure(c);
XSync(dpy, False);
@ -1792,7 +1800,7 @@ fullscreen(const Arg *arg)
{
if (selmon->showbar) {
for(last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++);
setlayout(&((Arg) { .v = &layouts[2] }));
setlayout(&((Arg) { .v = &layouts[3] }));
} else {
setlayout(&((Arg) { .v = last_layout }));
}