aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbWinFrame.cc23
-rw-r--r--src/FbWinFrame.hh15
2 files changed, 25 insertions, 13 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index e65e61b..a848788 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -19,15 +19,16 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrame.cc,v 1.29 2003/06/24 14:05:00 fluxgen Exp $ 22// $Id: FbWinFrame.cc,v 1.30 2003/07/10 11:36:21 fluxgen Exp $
23 23
24#include "FbWinFrame.hh" 24#include "FbWinFrame.hh"
25#include "ImageControl.hh" 25#include "ImageControl.hh"
26#include "EventManager.hh" 26#include "EventManager.hh"
27#include "TextButton.hh" 27#include "TextButton.hh"
28#include "App.hh" 28#include "App.hh"
29#include "FbWinFrameTheme.hh"
29#ifdef SHAPE 30#ifdef SHAPE
30//#include "Shape.hh" 31#include "Shape.hh"
31#endif // SHAPE 32#endif // SHAPE
32 33
33#include <algorithm> 34#include <algorithm>
@@ -71,9 +72,8 @@ FbWinFrame::FbWinFrame(FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl,
71 m_focused(false), 72 m_focused(false),
72 m_visible(false), 73 m_visible(false),
73 m_button_pm(0), 74 m_button_pm(0),
74 m_themelistener(*this) { 75 m_themelistener(*this),
75 76 m_shape(new Shape(m_window, theme.shapePlace())) {
76 // m_shape(new Shape(m_window, 0)) { //Shape::TOPLEFT | Shape::TOPRIGHT)) {
77 theme.addListener(m_themelistener); 77 theme.addListener(m_themelistener);
78 init(); 78 init();
79} 79}
@@ -488,8 +488,6 @@ void FbWinFrame::configureNotifyEvent(XConfigureEvent &event) {
488 488
489void FbWinFrame::reconfigure() { 489void FbWinFrame::reconfigure() {
490 m_window.clear(); 490 m_window.clear();
491 // if (m_shape.get())
492 // m_shape->update();
493 491
494 // align titlebar and render it 492 // align titlebar and render it
495 if (m_use_titlebar) 493 if (m_use_titlebar)
@@ -542,6 +540,17 @@ void FbWinFrame::reconfigure() {
542 renderButtons(); 540 renderButtons();
543 if (!m_shaded) 541 if (!m_shaded)
544 renderHandles(); 542 renderHandles();
543
544 if (m_shape.get() && theme().shapePlace() == Shape::NONE)
545 m_shape.reset(0);
546 else if (m_shape.get() == 0 && theme().shapePlace() != Shape::NONE)
547 m_shape.reset(new Shape(window(), theme().shapePlace()));
548 else if (m_shape.get())
549 m_shape->setPlaces(theme().shapePlace());
550
551 if (m_shape.get())
552 m_shape->update();
553
545 // titlebar stuff rendered already by reconftitlebar 554 // titlebar stuff rendered already by reconftitlebar
546} 555}
547 556
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh
index 74d1e76..49bb452 100644
--- a/src/FbWinFrame.hh
+++ b/src/FbWinFrame.hh
@@ -19,27 +19,29 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrame.hh,v 1.8 2003/05/21 23:59:53 rathnor Exp $ 22// $Id: FbWinFrame.hh,v 1.9 2003/07/10 11:36:21 fluxgen Exp $
23 23
24#ifndef FBWINFRAME_HH 24#ifndef FBWINFRAME_HH
25#define FBWINFRAME_HH 25#define FBWINFRAME_HH
26 26
27#include "FbWindow.hh" 27#include "FbWindow.hh"
28#include "Button.hh"
29#include "EventHandler.hh" 28#include "EventHandler.hh"
30#include "Font.hh"
31#include "Text.hh"
32#include "FbWinFrameTheme.hh"
33#include "RefCount.hh" 29#include "RefCount.hh"
34#include "Command.hh"
35#include "Observer.hh" 30#include "Observer.hh"
31#include "Color.hh"
32#include "FbPixmap.hh"
36 33
37#include <vector> 34#include <vector>
38#include <string> 35#include <string>
36#include <memory>
39 37
38class Shape;
40class FbWinFrameTheme; 39class FbWinFrameTheme;
41namespace FbTk { 40namespace FbTk {
42class ImageControl; 41class ImageControl;
42class Command;
43class Button;
44class Texture;
43}; 45};
44 46
45/// holds a window frame with a client window 47/// holds a window frame with a client window
@@ -266,6 +268,7 @@ private:
266 FbWinFrame &m_frame; 268 FbWinFrame &m_frame;
267 }; 269 };
268 ThemeListener m_themelistener; 270 ThemeListener m_themelistener;
271 std::auto_ptr<Shape> m_shape;
269}; 272};
270 273
271#endif // FBWINFRAME_HH 274#endif // FBWINFRAME_HH