X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fclient.hh;h=4bc7a517140df0ac4efb9af4be88e68d491310bf;hb=39c6969de2714904dec901c9d3f4e8b0ff01f062;hp=c8110a3f70e75661926412e374a7f3ce0dac998a;hpb=ab2968b3a5d61e2dc6b0a64153a7abb0078ee442;p=chaz%2Fopenbox diff --git a/src/client.hh b/src/client.hh index c8110a3f..4bc7a517 100644 --- a/src/client.hh +++ b/src/client.hh @@ -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);