]> Dogcows Code - chaz/openbox/blobdiff - util/epist/window.cc
make shading work
[chaz/openbox] / util / epist / window.cc
index 4027b47fb337def6cd6b3d767ee25cd273f26ee1..e650f4156937e3aab8cc4c8e0783a04c2d0a0b25 100644 (file)
@@ -31,12 +31,13 @@ using std::endl;
 using std::hex;
 using std::dec;
 
-#include "window.hh"
 #include "epist.hh"
+#include "screen.hh"
+#include "window.hh"
 #include "../../src/XAtom.hh"
 
-XWindow::XWindow(epist *epist, Window window)
-  : _epist(epist), _xatom(epist->xatom()), _window(window) {
+XWindow::XWindow(epist *epist, screen *screen, Window window)
+  : _epist(epist), _screen(screen), _xatom(epist->xatom()), _window(window) {
 
   _unmapped = false;
 
@@ -140,3 +141,10 @@ void XWindow::processEvent(const XEvent &e) {
     break;
   }
 }
+  
+
+void XWindow::shade(const bool sh) const {
+  _xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_wm_state,
+                            _window, (sh ? 1 : 0),
+                            _xatom->getAtom(XAtom::net_wm_state_shaded));
+}
This page took 0.020533 seconds and 4 git commands to generate.