]> Dogcows Code - chaz/openbox/blobdiff - src/frame.hh
make window placement not go off screen at all
[chaz/openbox] / src / frame.hh
index 0a22cbaa1244edd75e6b05123a801151e6fbd259..5da88902695a44569af15f2f2ff75b04e0d31e27 100644 (file)
@@ -18,6 +18,7 @@ extern "C" {
 #include "otk/screeninfo.hh"
 #include "otk/style.hh"
 #include "otk/widget.hh"
+#include "otk/ustring.hh"
 
 #include <string>
 
@@ -39,9 +40,6 @@ private:
   Client *_client;
   const otk::ScreenInfo *_screen;
 
-  //! The style to use for size and display the decorations
-  otk::Style *_style;
-
   //! The size of the frame on each side of the client window
   otk::Strut _size;
 
@@ -77,6 +75,14 @@ public:
   //! Destroys the Frame object
   virtual ~Frame();
 
+  otk::Rect area() const {
+    otk::Rect a(_client->area());
+    a.setRect(a.x() - _size.left, a.y() - _size.top,
+              a.width() + _size.left + _size.right,
+              a.height() + _size.top + _size.bottom);
+    return a;
+  }
+  
   //! Set the style to decorate the frame with
   virtual void setStyle(otk::Style *style);
 
@@ -88,7 +94,7 @@ public:
   //! Displays unfocused decorations
   virtual void unfocus();
 
-  void setTitle(const std::string &text);
+  void setTitle(const otk::ustring &text);
  
   //! Reparents the client window from the root window onto the frame
   void grabClient();
This page took 0.024293 seconds and 4 git commands to generate.