all repos — fluxbox @ 5b7bde2ffbac62f75cb8539f5ab43bb5f4274eae

custom fork of the fluxbox windowmanager

fix initialization of WorkspaceNameTheme
Mark Tiefenbruck mark@fluxbox.org
commit

5b7bde2ffbac62f75cb8539f5ab43bb5f4274eae

parent

b302dab2f187e364df36237c44b8e48f1e892f04

2 files changed, 11 insertions(+), 13 deletions(-)

jump to
M src/WorkspaceNameTheme.hhsrc/WorkspaceNameTheme.hh

@@ -30,7 +30,10 @@ public FbTk::ThemeProxy<WorkspaceNameTheme> {

public: WorkspaceNameTheme(int screen_num, const std::string &name, - const std::string &alt_name):ToolTheme(screen_num, name, alt_name) { } + const std::string &alt_name): + ToolTheme(screen_num, name, alt_name) { + FbTk::ThemeManager::instance().loadTheme(*this); + } bool fallback(FbTk::ThemeItem_base &item) { if (item.name() == "toolbar.workspace.textColor") {
M src/WorkspaceNameTool.ccsrc/WorkspaceNameTool.cc

@@ -45,7 +45,6 @@ // setup signals

screen.workspaceNamesSig().attach(this); screen.currentWorkspaceSig().attach(this); theme.reconfigSig().attach(this); - } WorkspaceNameTool::~WorkspaceNameTool() {

@@ -132,12 +131,16 @@ m_button.setBorderWidth(m_theme->border().width());

} void WorkspaceNameTool::reRender() { + if (m_pixmap) + m_screen.imageControl().removeImage(m_pixmap); + if (m_theme->texture().usePixmap()) { - if (m_pixmap) - m_screen.imageControl().removeImage(m_pixmap); m_pixmap = m_screen.imageControl().renderImage(width(), height(), m_theme->texture(), orientation()); m_button.setBackgroundPixmap(m_pixmap); + } else { + m_pixmap = 0; + m_button.setBackgroundColor(m_theme->texture().color()); } }

@@ -148,15 +151,7 @@ m_button.setBorderWidth(m_theme->border().width());

m_button.setBorderColor(m_theme->border().color()); m_button.setAlpha(alpha); - if (!m_theme->texture().usePixmap()) { - if (m_pixmap) - m_screen.imageControl().removeImage(m_pixmap); - m_pixmap = 0; - m_button.setBackgroundColor(m_theme->texture().color()); - } else { - reRender(); - } - + reRender(); m_button.clear(); }