summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 6f1cd9b..01f01c7 100644
--- a/main.cpp
+++ b/main.cpp
@@ -589,6 +589,7 @@ void fullscreen(const KeyArg arg)
int cID = getFrame(fID).cID;
getClient(cID).fullscreen ^= true;
tileRoots();
+ setFullscreen(focusedWindow, getClient(cID).fullscreen);
}
void configureRequest(XConfigureRequestEvent e)
@@ -862,6 +863,26 @@ void clientMessage(XClientMessageEvent e)
setCurrentDesktop(currWS);
*/
}
+ else if(e.message_type == XInternAtom(dpy, "_NET_WM_STATE", false))
+ {
+ if((Atom)e.data.l[0] == 0)
+ log("\tremove");
+ if((Atom)e.data.l[0] == 1)
+ log("\ttoggle");
+ 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);
+ tileRoots();
+ }
+ XFree(prop1);
+ }
XFree(name);
}