]> Dogcows Code - chaz/openbox/blobdiff - src/client.hh
no space on teh top or bottom of text..
[chaz/openbox] / src / client.hh
index 79c018fdd71e24d68967060e281b69dbe512d69c..325162edd9070916468012b541a6cbdf16908b5d 100644 (file)
@@ -9,12 +9,17 @@
 
 extern "C" {
 #include <X11/Xlib.h>
+
+#ifdef    SHAPE
+#include <X11/extensions/shape.h>
+#endif // SHAPE
 }
 
 #include <string>
 
 #include "otk/strut.hh"
 #include "otk/rect.hh"
+#include "otk/eventhandler.hh"
 
 namespace ob {
 
@@ -32,7 +37,7 @@ class OBFrame;
   class' member variables and call whatever is nessary to complete the
   change (such as causing a redraw of the titlebar after the title is changed).
 */
-class OBClient {
+class OBClient : public otk::OtkEventHandler {
 public:
 
   //! The frame window which decorates around the client window
@@ -89,7 +94,8 @@ public:
                     Decor_Border   = 1 << 2, //!< Display a border
                     Decor_Iconify  = 1 << 3, //!< Display an iconify button
                     Decor_Maximize = 1 << 4, //!< Display a maximize button
-                    Decor_Close    = 1 << 5  //!< Display a close button
+                    Decor_Sticky   = 1 << 5, //!< Display a sticky button
+                    Decor_Close    = 1 << 6  //!< Display a close button
   };
   //! Holds a bitmask of OBClient::Decoration values
   typedef unsigned char DecorationFlags;
@@ -114,9 +120,11 @@ public:
   };
 
   //! The event mask to grab on client windows
-  static const long event_mask = PropertyChangeMask | FocusChangeMask |
-                                 StructureNotifyMask;
+  static const long event_mask = PropertyChangeMask | FocusChangeMask;
 
+  //! The number of unmap events to ignore on the window
+  int ignore_unmaps;
+  
 private:
   //! The screen number on which the client resides
   int      _screen;
@@ -426,12 +434,12 @@ public:
   //! Returns the position and size of the client relative to the root window
   inline const otk::Rect &area() const { return _area; }
 
-  //! Updates the OBClient class from a property change XEvent
-  void update(const XPropertyEvent &e);
-  //! Processes a client message XEvent for the window and causes an action
-  //! or whatever was specified to occur
-  void update(const XClientMessageEvent &e);
+  virtual void propertyHandler(const XPropertyEvent &e);
 
+  virtual void clientMessageHandler(const XClientMessageEvent &e);
+
+  virtual void shapeHandler(const XShapeEvent &e);
+  
   //! Changes the stored positions and size of the OBClient window
   /*!
     This does not actually change the physical geometry, that needs to be done
This page took 0.021899 seconds and 4 git commands to generate.