summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonb <simonb>2005-04-13 14:39:25 (GMT)
committersimonb <simonb>2005-04-13 14:39:25 (GMT)
commitddcecec37e0ea559c9292423a257b47c423ddb9e (patch)
tree650ca599e242e31193c298b3bceac4b3f43ac949
parent88c66f0687d2a9e2018f22407b2587dc4d87d012 (diff)
downloadfluxbox_lack-ddcecec37e0ea559c9292423a257b47c423ddb9e.zip
fluxbox_lack-ddcecec37e0ea559c9292423a257b47c423ddb9e.tar.bz2
fix a few small bugs from recent big patch
-rw-r--r--src/FbTk/Button.cc8
-rw-r--r--src/FbTk/Button.hh2
-rw-r--r--src/FbTk/TextButton.cc1
-rw-r--r--src/FbWinFrame.cc10
-rw-r--r--src/WinButton.cc8
5 files changed, 21 insertions, 8 deletions
diff --git a/src/FbTk/Button.cc b/src/FbTk/Button.cc
index 414979b..cc515f8 100644
--- a/src/FbTk/Button.cc
+++ b/src/FbTk/Button.cc
@@ -92,10 +92,10 @@ void Button::buttonPressEvent(XButtonEvent &event) {
92 bool update = false; 92 bool update = false;
93 if (m_pressed_pm != 0) { 93 if (m_pressed_pm != 0) {
94 update = true; 94 update = true;
95 FbWindow::setBackgroundPixmap(m_pressed_pm); 95 FbTk::FbWindow::setBackgroundPixmap(m_pressed_pm);
96 } else if (m_pressed_color.isAllocated()) { 96 } else if (m_pressed_color.isAllocated()) {
97 update = true; 97 update = true;
98 FbWindow::setBackgroundColor(m_pressed_color); 98 FbTk::FbWindow::setBackgroundColor(m_pressed_color);
99 } 99 }
100 100
101 m_pressed = true; 101 m_pressed = true;
@@ -110,11 +110,11 @@ void Button::buttonReleaseEvent(XButtonEvent &event) {
110 if (m_background_pm) { 110 if (m_background_pm) {
111 if (m_pressed_pm != 0) { 111 if (m_pressed_pm != 0) {
112 update = true; 112 update = true;
113 FbTk::FbWindow::setBackgroundPixmap(m_background_pm); 113 setBackgroundPixmap(m_background_pm);
114 } 114 }
115 } else if (m_pressed_color.isAllocated()) { 115 } else if (m_pressed_color.isAllocated()) {
116 update = true; 116 update = true;
117 FbTk::FbWindow::setBackgroundColor(m_background_color); 117 setBackgroundColor(m_background_color);
118 } 118 }
119 119
120 if (update) 120 if (update)
diff --git a/src/FbTk/Button.hh b/src/FbTk/Button.hh
index 48aff02..02b7b51 100644
--- a/src/FbTk/Button.hh
+++ b/src/FbTk/Button.hh
@@ -75,7 +75,9 @@ public:
75 75
76 GC gc() const { return m_gc; } 76 GC gc() const { return m_gc; }
77 Pixmap backgroundPixmap() const { return m_background_pm; } 77 Pixmap backgroundPixmap() const { return m_background_pm; }
78 Pixmap pressedPixmap() const { return m_pressed_pm; }
78 const Color &backgroundColor() const { return m_background_color; } 79 const Color &backgroundColor() const { return m_background_color; }
80 const Color &pressedColor() const { return m_pressed_color; }
79private: 81private:
80 Pixmap m_background_pm; ///< background pixmap 82 Pixmap m_background_pm; ///< background pixmap
81 Color m_background_color; ///< background color 83 Color m_background_color; ///< background color
diff --git a/src/FbTk/TextButton.cc b/src/FbTk/TextButton.cc
index bdf5002..fdbdc78 100644
--- a/src/FbTk/TextButton.cc
+++ b/src/FbTk/TextButton.cc
@@ -106,7 +106,6 @@ void TextButton::clearArea(int x, int y,
106 // and if so, then clear a rectangle that encompases all the text plus the 106 // and if so, then clear a rectangle that encompases all the text plus the
107 // requested area? 107 // requested area?
108 drawText(); 108 drawText();
109
110} 109}
111 110
112unsigned int TextButton::textWidth() const { 111unsigned int TextButton::textWidth() const {
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index c030712..ba98740 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -246,6 +246,7 @@ void FbWinFrame::notifyMoved(bool clear) {
246} 246}
247 247
248void FbWinFrame::clearAll() { 248void FbWinFrame::clearAll() {
249
249 if (m_use_titlebar) { 250 if (m_use_titlebar) {
250 redrawTitlebar(); 251 redrawTitlebar();
251 252
@@ -853,8 +854,13 @@ void FbWinFrame::reconfigure() {
853 854
854 855
855 // render the theme 856 // render the theme
856 renderAll(); 857 if (isVisible()) {
857 applyAll(); 858 renderAll();
859 applyAll();
860 clearAll();
861 } else {
862 m_need_render = true;
863 }
858 864
859 if (m_shape.get() && theme().shapePlace() == Shape::NONE || m_disable_shape) 865 if (m_shape.get() && theme().shapePlace() == Shape::NONE || m_disable_shape)
860 m_shape.reset(0); 866 m_shape.reset(0);
diff --git a/src/WinButton.cc b/src/WinButton.cc
index 9ae2593..4802518 100644
--- a/src/WinButton.cc
+++ b/src/WinButton.cc
@@ -84,7 +84,7 @@ void WinButton::setPressedPixmap(Pixmap pm) {
84 overrode_pressed = false; 84 overrode_pressed = false;
85 } 85 }
86 86
87 FbTk::Button::setBackgroundPixmap(pm); 87 FbTk::Button::setPressedPixmap(pm);
88} 88}
89 89
90void WinButton::setPressedColor(const FbTk::Color &color) { 90void WinButton::setPressedColor(const FbTk::Color &color) {
@@ -236,5 +236,11 @@ void WinButton::clear() {
236} 236}
237 237
238void WinButton::update(FbTk::Subject *subj) { 238void WinButton::update(FbTk::Subject *subj) {
239 // pressed_pixmap isn't stateful in any current buttons, so no need
240 // to potentially override that. Just make sure background pm is ok
241 Pixmap my_pm = getBackgroundPixmap();
242 if (my_pm != None)
243 setBackgroundPixmap(my_pm);
244
239 clear(); 245 clear();
240} 246}