all repos — fluxbox @ ddcecec37e0ea559c9292423a257b47c423ddb9e

custom fork of the fluxbox windowmanager

fix a few small bugs from recent big patch
simonb simonb
commit

ddcecec37e0ea559c9292423a257b47c423ddb9e

parent

88c66f0687d2a9e2018f22407b2587dc4d87d012

5 files changed, 21 insertions(+), 8 deletions(-)

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

@@ -92,10 +92,10 @@ void Button::buttonPressEvent(XButtonEvent &event) {

bool update = false; if (m_pressed_pm != 0) { update = true; - FbWindow::setBackgroundPixmap(m_pressed_pm); + FbTk::FbWindow::setBackgroundPixmap(m_pressed_pm); } else if (m_pressed_color.isAllocated()) { update = true; - FbWindow::setBackgroundColor(m_pressed_color); + FbTk::FbWindow::setBackgroundColor(m_pressed_color); } m_pressed = true;

@@ -110,11 +110,11 @@ bool update = false;

if (m_background_pm) { if (m_pressed_pm != 0) { update = true; - FbTk::FbWindow::setBackgroundPixmap(m_background_pm); + setBackgroundPixmap(m_background_pm); } } else if (m_pressed_color.isAllocated()) { update = true; - FbTk::FbWindow::setBackgroundColor(m_background_color); + setBackgroundColor(m_background_color); } if (update)
M src/FbTk/Button.hhsrc/FbTk/Button.hh

@@ -75,7 +75,9 @@ bool pressed() const { return m_pressed; }

GC gc() const { return m_gc; } Pixmap backgroundPixmap() const { return m_background_pm; } + Pixmap pressedPixmap() const { return m_pressed_pm; } const Color &backgroundColor() const { return m_background_color; } + const Color &pressedColor() const { return m_pressed_color; } private: Pixmap m_background_pm; ///< background pixmap Color m_background_color; ///< background color
M src/FbTk/TextButton.ccsrc/FbTk/TextButton.cc

@@ -106,7 +106,6 @@ // TODO: do we need to check if the text overlaps the clearing area

// and if so, then clear a rectangle that encompases all the text plus the // requested area? drawText(); - } unsigned int TextButton::textWidth() const {
M src/FbWinFrame.ccsrc/FbWinFrame.cc

@@ -246,6 +246,7 @@ }

} void FbWinFrame::clearAll() { + if (m_use_titlebar) { redrawTitlebar();

@@ -853,8 +854,13 @@ }

// render the theme - renderAll(); - applyAll(); + if (isVisible()) { + renderAll(); + applyAll(); + clearAll(); + } else { + m_need_render = true; + } if (m_shape.get() && theme().shapePlace() == Shape::NONE || m_disable_shape) m_shape.reset(0);
M src/WinButton.ccsrc/WinButton.cc

@@ -84,7 +84,7 @@ } else {

overrode_pressed = false; } - FbTk::Button::setBackgroundPixmap(pm); + FbTk::Button::setPressedPixmap(pm); } void WinButton::setPressedColor(const FbTk::Color &color) {

@@ -236,5 +236,11 @@ drawType();

} void WinButton::update(FbTk::Subject *subj) { + // pressed_pixmap isn't stateful in any current buttons, so no need + // to potentially override that. Just make sure background pm is ok + Pixmap my_pm = getBackgroundPixmap(); + if (my_pm != None) + setBackgroundPixmap(my_pm); + clear(); }