diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2023-02-03 17:45:07 +1300 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2023-06-21 20:19:01 +1200 |
| commit | ab3d823a8190ae6ec4a1444aa3b5a01aaa018586 (patch) | |
| tree | 7ab08c3e4675a0b92383670da88e4e49db20cf28 /ewmh.cpp | |
| parent | ef998ee445e8a59a1cc5c9d15d721aabea187fd7 (diff) | |
| download | YATwm-ab3d823a8190ae6ec4a1444aa3b5a01aaa018586.tar.gz YATwm-ab3d823a8190ae6ec4a1444aa3b5a01aaa018586.zip | |
feat: Windows that request to be fullscreen should become fullscreen - more testing neededs
Diffstat (limited to 'ewmh.cpp')
| -rw-r--r-- | ewmh.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -65,6 +65,18 @@ void setCurrentDesktop(int desktop) XChangeProperty(*dpy_, *root_, netCurrentDesktop, XA_CARDINAL, 32, PropModeReplace, (unsigned char*)&currDesktop, 1); } +void setFullscreen(Window w, bool fullscreen) +{ + Atom netWMState = XInternAtom(*dpy_, "_NET_WM_STATE", true); + Atom netWMStateVal; + if(fullscreen) + netWMStateVal = XInternAtom(*dpy_, "_NET_WM_STATE_FULLSCREEN", true); + else + netWMStateVal = XInternAtom(*dpy_, "", true); + XChangeProperty(*dpy_, w, netWMState, XA_ATOM, 32, PropModeReplace, (unsigned char*)&netWMStateVal, 1); + +} + int getProp(Window w, char* propName, Atom* type, unsigned char** data) { Atom prop_type = XInternAtom(*dpy_, propName, false); |
