Fix fullscreen
This commit is contained in:
parent
75a4d98edc
commit
bb6ccde971
2
config.h
2
config.h
@ -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 systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
||||||
static const unsigned int systrayspacing = 2; /* systray spacing */
|
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 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 showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
static const char *fonts[] = { "monospace:size=10" };
|
static const char *fonts[] = { "monospace:size=10" };
|
||||||
|
10
dwm.c
10
dwm.c
@ -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 }));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user