]> Dogcows Code - chaz/openbox/blobdiff - src/client.hh
allow for the client to be validated.
[chaz/openbox] / src / client.hh
index c8110a3f70e75661926412e374a7f3ce0dac998a..4bc7a517140df0ac4efb9af4be88e68d491310bf 100644 (file)
@@ -236,6 +236,17 @@ private:
   */
   int _border_width;
 
+  //! The minimum aspect ratio the client window can be sized to.
+  /*!
+    A value of 0 means this is ignored.
+  */
+  float _min_ratio;
+  //! The maximum aspect ratio the client window can be sized to.
+  /*!
+    A value of 0 means this is ignored.
+  */
+  float _max_ratio;
+  
   //! The minimum size of the client window
   /*!
     If the min is > the max, then the window is not resizable
@@ -429,6 +440,8 @@ private:
     @param anchor The corner to keep in the same position when resizing.
     @param w The width component of the new size for the client.
     @param h The height component of the new size for the client.
+    @param user Specifies whether this is a user-requested change or a
+                program requested change.
     @param x An optional X coordinate to which the window will be moved
              after resizing.
     @param y An optional Y coordinate to which the window will be moved
@@ -436,7 +449,7 @@ private:
     The x and y coordinates must both be sepcified together, or they will have
     no effect. When they are specified, the anchor is ignored.
   */
-  void internal_resize(Corner anchor, int w, int h,
+  void internal_resize(Corner anchor, int w, int h, bool user = true,
                        int x = INT_MIN, int y = INT_MIN);
 
 public:
@@ -589,6 +602,14 @@ BB    @param window The window id that the Client class should handle
   //! Remove focus from the client window
   void unfocus() const;
 
+  //! Validate client, by making sure no Destroy or Unmap events exist in
+  //! the event queue for the window.
+  /*!
+    @return true if the client is valid; false if the client has already
+            been unmapped/destroyed, and so is invalid.
+  */
+  bool validate() const;
+  
   virtual void focusHandler(const XFocusChangeEvent &e);
   virtual void unfocusHandler(const XFocusChangeEvent &e);
   virtual void propertyHandler(const XPropertyEvent &e);
This page took 0.023267 seconds and 4 git commands to generate.