X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fclient.hh;h=b4e01effe74b095e29fba7f39fe31e79ac9cc6fa;hb=cf0823dcf3d1ee8e61be0dfc842b1be3a34b3aee;hp=1a6d3b1aa03e8229d8c50dee11fc53275b959ddf;hpb=f2ae1c3b176e02eeb109478d3cfbf89647d66100;p=chaz%2Fopenbox diff --git a/src/client.hh b/src/client.hh index 1a6d3b1a..b4e01eff 100644 --- a/src/client.hh +++ b/src/client.hh @@ -9,6 +9,10 @@ extern "C" { #include + +#ifdef SHAPE +#include +#endif // SHAPE } #include @@ -18,6 +22,8 @@ extern "C" { namespace ob { +class OBFrame; + //! Maintains the state of a client window. /*! OBClient maintains the state of a client window. The state consists of the @@ -32,6 +38,10 @@ namespace ob { */ class OBClient { public: + + //! The frame window which decorates around the client window + OBFrame *frame; + //! Possible window types enum WindowType { Type_Desktop, //!< A desktop (bottom-most window) Type_Dock, //!< A dock bar/panel window @@ -83,7 +93,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; @@ -107,7 +118,14 @@ public: State_Toggle //!< _NET_WM_STATE_TOGGLE }; + //! The event mask to grab on client windows + static const long event_mask = PropertyChangeMask | FocusChangeMask | + StructureNotifyMask; + private: + //! The screen number on which the client resides + int _screen; + //! The actual window that this class is wrapping up Window _window; @@ -272,11 +290,15 @@ public: //! Constructs a new OBClient object around a specified window id /*! @param window The window id that the OBClient class should handle + @param screen The screen on which the window resides */ - OBClient(Window window); + OBClient(int screen, Window window); //! Destroys the OBClient object virtual ~OBClient(); + //! Returns the screen on which the clien resides + inline int screen() const { return _screen; } + //! Returns the window id that the OBClient object is handling inline Window window() const { return _window; } @@ -414,6 +436,10 @@ public: //! Processes a client message XEvent for the window and causes an action //! or whatever was specified to occur void update(const XClientMessageEvent &e); +#if defined(SHAPE) || defined(DOXYGEN_IGNORE) + //! Updates the client's shape status + void update(const XShapeEvent &e); +#endif //! Changes the stored positions and size of the OBClient window /*!