aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextButton.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-14 09:50:01 (GMT)
committerfluxgen <fluxgen>2003-09-14 09:50:01 (GMT)
commit1111861bd245d23613446d09fc299b0e15bfd42a (patch)
tree9505107076349262060924a74b756d077172d9e9 /src/FbTk/TextButton.cc
parentb580752cb032dab518b7ed97c0bd1c2d5e257a0c (diff)
downloadfluxbox-1111861bd245d23613446d09fc299b0e15bfd42a.zip
fluxbox-1111861bd245d23613446d09fc299b0e15bfd42a.tar.bz2
less flicker
Diffstat (limited to 'src/FbTk/TextButton.cc')
-rw-r--r--src/FbTk/TextButton.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/FbTk/TextButton.cc b/src/FbTk/TextButton.cc
index a9a867f..4b2d45e 100644
--- a/src/FbTk/TextButton.cc
+++ b/src/FbTk/TextButton.cc
@@ -19,7 +19,7 @@
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: TextButton.cc,v 1.2 2003/09/10 21:36:37 fluxgen Exp $ 22// $Id: TextButton.cc,v 1.3 2003/09/14 09:50:01 fluxgen Exp $
23 23
24#include "TextButton.hh" 24#include "TextButton.hh"
25#include "Font.hh" 25#include "Font.hh"
@@ -86,7 +86,6 @@ void TextButton::clear() {
86void TextButton::clearArea(int x, int y, 86void TextButton::clearArea(int x, int y,
87 unsigned int width, unsigned int height, 87 unsigned int width, unsigned int height,
88 bool exposure) { 88 bool exposure) {
89
90 if (backgroundPixmap() != ParentRelative) { 89 if (backgroundPixmap() != ParentRelative) {
91 90
92 if (backgroundPixmap()) { 91 if (backgroundPixmap()) {
@@ -106,13 +105,17 @@ void TextButton::clearArea(int x, int y,
106 105
107 drawText(); 106 drawText();
108 107
109 FbWindow::setBackgroundPixmap(m_buffer.drawable()); 108 setBufferPixmap(m_buffer.drawable());
110 109 FbWindow::setBackgroundPixmap(m_buffer.drawable());
111 Button::clearArea(x, y, width, height, exposure); 110 updateTransparent(x, y, width, height);
112 111
112 FbWindow::clearArea(x, y, width, height, exposure);
113
113 } else { // parent relative 114 } else { // parent relative
115 FbWindow::setBufferPixmap(0);
114 FbWindow::setBackgroundPixmap(backgroundPixmap()); 116 FbWindow::setBackgroundPixmap(backgroundPixmap());
115 Button::clearArea(x, y, width, height, exposure); 117 Button::clearArea(x, y, width, height, exposure);
118 updateTransparent(x, y, width, height);
116 drawText(); 119 drawText();
117 } 120 }
118 121
@@ -144,4 +147,8 @@ void TextButton::drawText(int x_offset, int y_offset) {
144 align_x + x_offset, center_pos + y_offset); // position 147 align_x + x_offset, center_pos + y_offset); // position
145} 148}
146 149
150void TextButton::exposeEvent(XExposeEvent &event) {
151 clearArea(event.x, event.y, event.width, event.height, false);
152}
153
147}; // end namespace FbTk 154}; // end namespace FbTk