summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBossCode45 <human.cyborg42@gmail.com>2023-02-25 17:07:29 +1300
committerBossCode45 <human.cyborg42@gmail.com>2023-06-21 20:19:01 +1200
commit21b1840e0982929c1fa8acc5fadd203dccc94585 (patch)
treec79e1e73111c1453a326365411732b9d5ae6aa5d
parentab3d823a8190ae6ec4a1444aa3b5a01aaa018586 (diff)
downloadYATwm-21b1840e0982929c1fa8acc5fadd203dccc94585.tar.gz
YATwm-21b1840e0982929c1fa8acc5fadd203dccc94585.zip
fixup: Make fullscreen request either toggle or add
I'm not sure if add prop is ever going to be used though. I've tested with both OBS and qutebrowser and both send 2 toggle requests to go fullscreen, and 2 remove requests to get out of fullscreen
-rw-r--r--main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index 01f01c7..af9210b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -872,13 +872,12 @@ void clientMessage(XClientMessageEvent e)
if((Atom)e.data.l[0] == 2)
log("\tadd");
char* prop1 = XGetAtomName(dpy, (Atom)e.data.l[1]);
- log("\tprop1");
if((Atom)e.data.l[1] == XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", false))
{
int fID = getFrameID(e.window);
int cID = getFrame(fID).cID;
- getClient(cID).fullscreen = (Atom) e.data.l[0] == 1;
- setFullscreen(e.window, (Atom) e.data.l[0] == 1);
+ getClient(cID).fullscreen = (Atom) e.data.l[0] > 0;
+ setFullscreen(e.window, (Atom) e.data.l[0] > 0);
tileRoots();
}
XFree(prop1);