all repos — fluxbox @ 40c0c7c3646d854430919eff2b211e5f0c7bf780

custom fork of the fluxbox windowmanager

fixed bug with keys not working when using a style background
markt markt
commit

40c0c7c3646d854430919eff2b211e5f0c7bf780

parent

ed3731fa30c8563e1187ff72528fcc2ca567c43d

3 files changed, 12 insertions(+), 7 deletions(-)

jump to
M src/RootTheme.ccsrc/RootTheme.cc

@@ -25,6 +25,7 @@ #include "RootTheme.hh"

#include "FbRootWindow.hh" #include "FbCommands.hh" +#include "Screen.hh" #include "FbTk/App.hh" #include "FbTk/Font.hh"

@@ -141,8 +142,9 @@ bool m_changed, m_loaded;

}; -RootTheme::RootTheme(FbTk::ImageControl &image_control): +RootTheme::RootTheme(FbTk::ImageControl &image_control, BScreen *scrn): FbTk::Theme(image_control.screenNumber()), + m_screen(scrn), m_background(new BackgroundItem(*this, "background", "Background")), m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())), m_image_ctrl(image_control) {

@@ -182,10 +184,8 @@ "Background missing warning")<<endl;

return; } - if (!m_background->changed()) + if (!m_background->changed() || !m_screen) return; - - m_background->setApplied(); // style doesn't wish to change the background if (strstr(m_background->options().c_str(), "none") != 0)

@@ -196,7 +196,9 @@ // Else parse background from style

// // root window helper - FbRootWindow rootwin(screenNum()); + FbRootWindow &rootwin = m_screen->rootWindow(); + + m_background->setApplied(); // handle background option in style std::string filename = m_background->filename();
M src/RootTheme.hhsrc/RootTheme.hh

@@ -33,6 +33,7 @@

#include <string> class BackgroundItem; +class BScreen; namespace FbTk { class ResourceManager;

@@ -45,7 +46,7 @@ public:

/// constructor /// @param resmanager resource manager for finding specific resources /// @param image_control for rendering background texture - RootTheme(FbTk::ImageControl &image_control); + RootTheme(FbTk::ImageControl &image_control, BScreen *scrn = 0); ~RootTheme(); bool fallback(FbTk::ThemeItem_base &item);

@@ -61,6 +62,7 @@ m_opgc.setLineAttributes(width, line_style, cap_style, join_style);

} private: + BScreen *m_screen; BackgroundItem *m_background;///< background image/texture FbTk::GContext m_opgc; FbTk::ImageControl &m_image_ctrl; ///< image control for rendering background texture
M src/Screen.ccsrc/Screen.cc

@@ -439,7 +439,8 @@ FbCommands::ExecuteCmd cmd(*resource.rootcommand, screenNumber());

cmd.execute(); } - m_root_theme.reset(new RootTheme(imageControl())); + m_root_theme.reset(new RootTheme(imageControl(), this)); + m_root_theme->reconfigTheme(); m_windowtheme->setFocusedAlpha(*resource.focused_alpha); m_windowtheme->setUnfocusedAlpha(*resource.unfocused_alpha);