X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.hh;h=4bc7a517140df0ac4efb9af4be88e68d491310bf;hb=39c6969de2714904dec901c9d3f4e8b0ff01f062;hp=420a8c4a5a73aa52c41e60abe0d45e25ddaae1f4;hpb=f4b87e04a2a1d285f7b6f93b3db08f040ba5c32c;p=chaz%2Fopenbox diff --git a/src/client.hh b/src/client.hh index 420a8c4a..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 @@ -406,6 +417,10 @@ private: */ void shade(bool shade); + //! Fires the urgent callbacks which lets the user do what they want with + //! urgent windows + void fireUrgent(); + //! Fullscreen's or unfullscreen's the client window /*! @param fs true if the window should be made fullscreen; false if it should @@ -425,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 @@ -432,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: @@ -585,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);