From 21b1840e0982929c1fa8acc5fadd203dccc94585 Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Sat, 25 Feb 2023 17:07:29 +1300 Subject: 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 --- main.cpp | 5 ++--- 1 file 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); -- cgit v1.2.3