]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
more layout fixes for the decoration elements
[chaz/openbox] / src / client.cc
index 4a99b0bc58eecbb27ca21870ae57c743c0a79f80..d6111ce2b40a7a9ba255c3b9785ecae1f8b30b04 100644 (file)
@@ -1,5 +1,9 @@
 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
 
+#ifdef HAVE_CONFIG_H
+# include "../config.h"
+#endif
+
 #include "client.hh"
 #include "screen.hh"
 #include "openbox.hh"
@@ -18,8 +22,8 @@ extern "C" {
 
 namespace ob {
 
-OBClient::OBClient(Window window)
-  : _window(window)
+OBClient::OBClient(int screen, Window window)
+  : _screen(screen), _window(window)
 {
   assert(window);
 
@@ -78,6 +82,7 @@ OBClient::OBClient(Window window)
   updateIconTitle();
   updateClass();
 
+/*
 #ifdef DEBUG
   printf("Mapped window: 0x%lx\n"
          "  title:         \t%s\t  icon title:    \t%s\n"
@@ -123,6 +128,7 @@ OBClient::OBClient(Window window)
          _floating ? "yes" : "no",
          _positioned ? "yes" : "no");
 #endif
+*/
 }
 
 
@@ -313,9 +319,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
 }
@@ -643,6 +653,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.026731 seconds and 4 git commands to generate.