property changes on the window and some client messages
*/
+#include "screen.hh"
#include "widgetbase.hh"
#include "otk/point.hh"
#include "otk/strut.hh"
namespace ob {
class Frame;
+class Screen;
//! The MWM Hints as retrieved from the window property
/*!
be returned to normal state.
@param savearea true to have the client's current size and position saved;
otherwise, they are not. You should not save when mapping a
- new window that is set to fullscreen.
+ new window that is set to fullscreen. This has no effect
+ when restoring a window from fullscreen.
*/
- void fullscreen(bool fs, bool savearea);
+ void fullscreen(bool fs, bool savearea = true);
//! Maximize or unmaximize the client window
/*!
@param dir 0 to set both horz and vert, 1 to set horz, 2 to set vert.
@param savearea true to have the client's current size and position saved;
otherwise, they are not. You should not save when mapping a
- new window that is set to fullscreen.
+ new window that is set to fullscreen. This has no effect
+ when unmaximizing a window.
*/
- void maximize(bool max, int dir, bool savearea);
+ void maximize(bool max, int dir, bool savearea = true);
//! Internal version of the Client::move function
/*!
//! Attempts to find and return a modal child of this window, recursively.
Client *findModalChild(Client *skip = 0) const;
+ //! Removes or reapplies the client's border to its window
+ /*!
+ Used when managing and unmanaging a window.
+ @param addborder true if adding the border to the client; false if removing
+ from the client
+ */
+ void toggleClientBorder(bool addborder);
+
+ //! Applies the states requested when the window mapped
+ /*!
+ This should be called only once, during the window mapping process. It
+ applies things like maximized, and fullscreen.
+ */
+ void applyStartupState();
+
public:
#ifndef SWIG
//! Constructs a new Client object around a specified window id
inline bool urgent() const { return _urgent; }
//! Returns if the window wants to be notified when it receives focus
inline bool focusNotify() const { return _focus_notify; }
+ //! Returns if the window is the focused window
+ inline bool focused() const { return _focused; }
//! Returns if the window uses the Shape extension
inline bool shaped() const { return _shaped; }
//! Returns the window's gravity
*/
const otk::Point &logicalSize() const { return _logical_size; }
- //! Applies the states requested when the window mapped
- /*!
- This should be called only once, during the window mapping process. It
- applies things like maximized, and fullscreen.
- */
- void applyStartupState();
-
- //! Removes or reapplies the client's border to its window
- /*!
- Used when managing and unmanaging a window.
- @param addborder true if adding the border to the client; false if removing
- from the client
- */
- void toggleClientBorder(bool addborder);
-
//! Returns the position and size of the client relative to the root window
inline const otk::Rect &area() const { return _area; }
*/
bool validate() const;
+ void installColormap(bool install) const;
+
virtual void focusHandler(const XFocusChangeEvent &e);
virtual void unfocusHandler(const XFocusChangeEvent &e);
virtual void propertyHandler(const XPropertyEvent &e);
virtual void mapRequestHandler(const XMapRequestEvent &e);
#if defined(SHAPE)
virtual void shapeHandler(const XShapeEvent &e);
-#endif // SHAPE
+#endif // SHAPE
+
+ friend void Screen::manageWindow(Window);
+ friend void Screen::unmanageWindow(Client *);
};
}