all repos — fluxbox @ 1111861bd245d23613446d09fc299b0e15bfd42a

custom fork of the fluxbox windowmanager

less flicker
fluxgen fluxgen
commit

1111861bd245d23613446d09fc299b0e15bfd42a

parent

b580752cb032dab518b7ed97c0bd1c2d5e257a0c

2 files changed, 15 insertions(+), 6 deletions(-)

jump to
M src/FbTk/TextButton.ccsrc/FbTk/TextButton.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: TextButton.cc,v 1.2 2003/09/10 21:36:37 fluxgen Exp $ +// $Id: TextButton.cc,v 1.3 2003/09/14 09:50:01 fluxgen Exp $ #include "TextButton.hh" #include "Font.hh"

@@ -86,7 +86,6 @@

void TextButton::clearArea(int x, int y, unsigned int width, unsigned int height, bool exposure) { - if (backgroundPixmap() != ParentRelative) { if (backgroundPixmap()) {

@@ -106,13 +105,17 @@ }

drawText(); - FbWindow::setBackgroundPixmap(m_buffer.drawable()); + setBufferPixmap(m_buffer.drawable()); + FbWindow::setBackgroundPixmap(m_buffer.drawable()); + updateTransparent(x, y, width, height); - Button::clearArea(x, y, width, height, exposure); - + FbWindow::clearArea(x, y, width, height, exposure); + } else { // parent relative + FbWindow::setBufferPixmap(0); FbWindow::setBackgroundPixmap(backgroundPixmap()); Button::clearArea(x, y, width, height, exposure); + updateTransparent(x, y, width, height); drawText(); }

@@ -142,6 +145,10 @@ screenNumber(),

gc(), // graphic context text().c_str(), textlen, // string and string size align_x + x_offset, center_pos + y_offset); // position +} + +void TextButton::exposeEvent(XExposeEvent &event) { + clearArea(event.x, event.y, event.width, event.height, false); } }; // end namespace FbTk
M src/FbTk/TextButton.hhsrc/FbTk/TextButton.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: TextButton.hh,v 1.2 2003/09/10 21:36:37 fluxgen Exp $ +// $Id: TextButton.hh,v 1.3 2003/09/14 09:50:01 fluxgen Exp $ #ifndef FBTK_TEXTBUTTON_HH #define FBTK_TEXTBUTTON_HH

@@ -55,6 +55,8 @@ /// clears area and redraws text

void clearArea(int x, int y, unsigned int width, unsigned int height, bool exposure = false); + + void exposeEvent(XExposeEvent &event); inline FbTk::Justify justify() const { return m_justify; } inline const std::string &text() const { return m_text; }