Make code made by fakefullscreen patch more readable

This commit is contained in:
Alex Kotov 2021-11-13 02:16:20 +05:00
parent ee3dc8a58a
commit 254b6a4c13
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 19 additions and 8 deletions

View File

@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int borderpx = 5; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */

25
dwm.c
View File

@ -632,16 +632,27 @@ clientmessage(XEvent *e)
return;
}
if (!c)
return;
if (!c) return;
if (cme->message_type == atoms->netatom[NetWMState]) {
if (cme->data.l[1] == atoms->netatom[NetWMFullscreen]
|| cme->data.l[2] == atoms->netatom[NetWMFullscreen])
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|| cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */));
if (
cme->data.l[1] == atoms->netatom[NetWMFullscreen]
||
cme->data.l[2] == atoms->netatom[NetWMFullscreen]
) {
setfullscreen(
c,
(
cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
||
cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */
)
);
}
} else if (cme->message_type == atoms->netatom[NetActiveWindow]) {
if (c != selmon->sel && !c->isurgent)
if (c != selmon->sel && !c->isurgent) {
seturgent(c, 1);
}
}
}