diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2023-02-25 17:07:29 +1300 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2023-06-21 20:19:01 +1200 |
| commit | 21b1840e0982929c1fa8acc5fadd203dccc94585 (patch) | |
| tree | c79e1e73111c1453a326365411732b9d5ae6aa5d | |
| parent | ab3d823a8190ae6ec4a1444aa3b5a01aaa018586 (diff) | |
| download | YATwm-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.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); |
