all repos — fluxbox @ bf9b60833f87a8b328d71dac5879bdf7a0300d6e

custom fork of the fluxbox windowmanager

fix FbPixmap retaining pixmap (that made cache not work properly)
Also small tidy in FbWinFrame.cc
simonb simonb
commit

bf9b60833f87a8b328d71dac5879bdf7a0300d6e

parent

131d04cf423b36bcfeba351eecc520b94586f729

3 files changed, 16 insertions(+), 18 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,10 @@

(Format: Year/Month/Day) Changes for 1.0rc2: *06/06/25: + * Fix [ 1512046 ] "window.label.unfocus.pixmap" doesn't update (Simon) + - FbPixmap::copy was keeping the same pixmap if they had same + dimensions. This effectively broke the image cache. + FbPixmap.cc * Explicitly map NoSymbol to keycode 0 (thanks Julien Trolet) (seems to be assigned to several keycodes) FbTk/KeyUtil.cc
M src/FbTk/FbPixmap.ccsrc/FbTk/FbPixmap.cc

@@ -126,24 +126,17 @@ return *this;

} void FbPixmap::copy(const FbPixmap &the_copy) { - - bool create_new = false; - - if (the_copy.width() != width() || - the_copy.height() != height() || - the_copy.depth() != depth() || - drawable() == 0) - create_new = true; - - if (create_new) - free(); + /* This function previously retained the old pixmap and copied in + the new contents if they had the same dimensions. + This broke the image cache, so we don't do that now. If you want to + do it, then you'll need to invalidate all copies of this pixmap in + the cache */ + free(); if (the_copy.drawable() != 0) { - if (create_new) { - create(the_copy.drawable(), - the_copy.width(), the_copy.height(), - the_copy.depth()); - } + create(the_copy.drawable(), + the_copy.width(), the_copy.height(), + the_copy.depth()); if (drawable()) { GContext gc(drawable());
M src/FbWinFrame.ccsrc/FbWinFrame.cc

@@ -1204,7 +1204,6 @@ render(m_theme.labelUnfocusTexture(), m_label_unfocused_color,

m_label_unfocused_pm, m_label.width(), m_label.height()); - renderButtons(); } void FbWinFrame::renderTabContainer() {

@@ -1240,6 +1239,8 @@

render(m_theme.labelActiveTexture(), m_labelbutton_active_color, m_labelbutton_active_pm, m_tab_container.width(), m_tab_container.height(), m_tab_container.orientation()); + + renderButtons(); }

@@ -1591,7 +1592,7 @@ button.setJustify(theme().justify());

button.setAlpha(m_focused?theme().focusedAlpha():theme().unfocusedAlpha()); if (m_labelbutton_active_pm != 0) { - button.setBackgroundPixmap(m_labelbutton_active_pm); + button.setBackgroundPixmap(m_labelbutton_active_pm); } else button.setBackgroundColor(m_labelbutton_active_color);