commit 5dd8e0d77eabd66c9d06e5e27d3e61b447a443c5
parent bdf805fcf6aa2aa144f01abaa3df6e2fb06132f2
Author: hhvn <hayden@haydenvh.com>
Date: Sat, 26 Dec 2020 19:49:44 +0000
dwm.c: prevent fullscreening of multiple clients
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/dwm.c b/dwm.c
@@ -1475,7 +1475,12 @@ setfocus(Client *c)
void
setfullscreen(Client *c, int fullscreen)
{
+ Client *c2;
+
if (fullscreen && !c->isfullscreen) {
+ for (c2 = selmon->clients; c2; c2 = c2->next)
+ if (c2->isfullscreen)
+ return; /* prevent fullscreening of multiple clients */
XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32,
PropModeReplace, (unsigned char*)&netatom[NetWMFullscreen], 1);
c->isfullscreen = 1;