]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
use the timer queue manager
[chaz/openbox] / src / client.cc
index 55f2fb4cf6174690a2a0e4b2c00fa4bb38e47545..57bf5161cf75614765292d8400f17e7d18ef5eae 100644 (file)
@@ -5,7 +5,7 @@
 #endif
 
 #include "client.hh"
-#include "screen.hh"
+#include "bbscreen.hh"
 #include "openbox.hh"
 #include "otk/display.hh"
 #include "otk/property.hh"
@@ -27,6 +27,8 @@ OBClient::OBClient(int screen, Window window)
 {
   assert(window);
 
+  ignore_unmaps = 0;
+  
   // update EVERYTHING the first time!!
 
   // the state is kinda assumed to be normal. is this right? XXX
@@ -272,7 +274,10 @@ void OBClient::getMwmHints()
 void OBClient::getArea()
 {
   XWindowAttributes wattrib;
-  assert(XGetWindowAttributes(otk::OBDisplay::display, _window, &wattrib));
+  Status ret;
+  
+  ret = XGetWindowAttributes(otk::OBDisplay::display, _window, &wattrib);
+  assert(ret != BadWindow);
 
   _area.setRect(wattrib.x, wattrib.y, wattrib.width, wattrib.height);
   _border_width = wattrib.border_width;
@@ -319,9 +324,13 @@ void OBClient::getShaped()
   if (otk::OBDisplay::shape()) {
     int foo;
     unsigned int ufoo;
+    int s;
 
-    XShapeQueryExtents(otk::OBDisplay::display, client.window, &_shaped, &foo,
+    XShapeSelectInput(otk::OBDisplay::display, _window, ShapeNotifyMask);
+
+    XShapeQueryExtents(otk::OBDisplay::display, _window, &s, &foo,
                        &foo, &ufoo, &ufoo, &foo, &foo, &foo, &ufoo, &ufoo);
+    _shaped = (s != 0);
   }
 #endif // SHAPE
 }
@@ -649,6 +658,14 @@ void OBClient::update(const XClientMessageEvent &e)
 }
 
 
+#if defined(SHAPE) || defined(DOXYGEN_IGNORE)
+void OBClient::update(const XShapeEvent &e)
+{
+  _shaped = e.shaped;
+}
+#endif
+
+
 void OBClient::setArea(const otk::Rect &area)
 {
   _area = area;
This page took 0.023439 seconds and 4 git commands to generate.