toggleDecorations!
authorDana Jansens <danakj@orodu.net>
Thu, 22 Aug 2002 00:10:21 +0000 (00:10 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 22 Aug 2002 00:10:21 +0000 (00:10 +0000)
util/epist/screen.cc
util/epist/window.cc
util/epist/window.hh

index 1bd7ad5..31a9023 100644 (file)
@@ -121,11 +121,11 @@ void screen::processEvent(const XEvent &e) {
     // root window
     if (e.xproperty.atom == _xatom->getAtom(XAtom::net_number_of_desktops))
       updateNumDesktops();
-    if (e.xproperty.atom == _xatom->getAtom(XAtom::net_current_desktop))
+    else if (e.xproperty.atom == _xatom->getAtom(XAtom::net_current_desktop))
       updateActiveDesktop();
-    if (e.xproperty.atom == _xatom->getAtom(XAtom::net_active_window))
+    else if (e.xproperty.atom == _xatom->getAtom(XAtom::net_active_window))
       updateActiveWindow();
-    if (e.xproperty.atom == _xatom->getAtom(XAtom::net_client_list)) {
+    else if (e.xproperty.atom == _xatom->getAtom(XAtom::net_client_list)) {
       // catch any window unmaps first
       XEvent ev;
       if (XCheckTypedWindowEvent(_epist->getXDisplay(), e.xany.window,
index 1e8bc22..8542971 100644 (file)
@@ -36,6 +36,13 @@ using std::dec;
 #include "window.hh"
 #include "../../src/XAtom.hh"
 
+  // defined by black/openbox
+const unsigned long XWindow::PropBlackboxAttributesElements;
+const unsigned long XWindow::AttribDecoration;
+const unsigned long XWindow::DecorNone;
+const unsigned long XWindow::DecorNormal;
+
+
 XWindow::XWindow(epist *epist, screen *screen, Window window)
   : _epist(epist), _screen(screen), _xatom(epist->xatom()), _window(window) {
 
@@ -203,8 +210,10 @@ void XWindow::processEvent(const XEvent &e) {
   case PropertyNotify:
     if (e.xproperty.atom == XA_WM_NORMAL_HINTS)
       updateNormalHints();
-    if (e.xproperty.atom == XA_WM_HINTS)
+    else if (e.xproperty.atom == XA_WM_HINTS)
       updateWMHints();
+    else if (e.xproperty.atom == _xatom->getAtom(XAtom::blackbox_attributes))
+      updateBlackboxAttributes();
     else if (e.xproperty.atom == _xatom->getAtom(XAtom::net_wm_state))
       updateState();
     else if (e.xproperty.atom == _xatom->getAtom(XAtom::net_wm_desktop))
index f80bcb3..ad00739 100644 (file)
@@ -47,10 +47,10 @@ public:
 
 private:
   // defined by black/openbox
-  static const unsigned int PropBlackboxAttributesElements = 9;
-  static const unsigned int AttribDecoration = 1 << 6;
-  static const unsigned int DecorNone = 0;
-  static const unsigned int DecorNormal = 2;
+  static const unsigned long PropBlackboxAttributesElements = 9;
+  static const unsigned long AttribDecoration = 1 << 6;
+  static const unsigned long DecorNone = 0;
+  static const unsigned long DecorNormal = 2;
 
   epist  *_epist;
   screen *_screen;