Make code made by noborder patch more readable

This commit is contained in:
Alex Kotov 2021-11-13 01:55:55 +05:00
parent 43b5ae8a6b
commit ee3dc8a58a
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 19 additions and 4 deletions

23
dwm.c
View File

@ -1527,14 +1527,29 @@ 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 (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
|| &monocle == c->mon->lt[c->mon->sellt]->arrange)
&& !c->isfullscreen && !c->isfloating
&& NULL != c->mon->lt[c->mon->sellt]->arrange) {
if (
(
(
nexttiled(c->mon->clients) == c
&&
!nexttiled(c->next)
)
||
&monocle == c->mon->lt[c->mon->sellt]->arrange
)
&&
!c->isfullscreen
&&
!c->isfloating
&&
NULL != c->mon->lt[c->mon->sellt]->arrange
) {
c->w = wc.width += c->bw * 2;
c->h = wc.height += c->bw * 2;
wc.border_width = 0;
}
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);