diff options
Diffstat (limited to 'src/RootTheme.cc')
-rw-r--r-- | src/RootTheme.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/RootTheme.cc b/src/RootTheme.cc index afe0ca0..1e54368 100644 --- a/src/RootTheme.cc +++ b/src/RootTheme.cc | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include "FbRootWindow.hh" | 26 | #include "FbRootWindow.hh" |
27 | #include "FbCommands.hh" | 27 | #include "FbCommands.hh" |
28 | #include "Screen.hh" | ||
28 | 29 | ||
29 | #include "FbTk/App.hh" | 30 | #include "FbTk/App.hh" |
30 | #include "FbTk/Font.hh" | 31 | #include "FbTk/Font.hh" |
@@ -141,8 +142,9 @@ private: | |||
141 | }; | 142 | }; |
142 | 143 | ||
143 | 144 | ||
144 | RootTheme::RootTheme(FbTk::ImageControl &image_control): | 145 | RootTheme::RootTheme(FbTk::ImageControl &image_control, BScreen *scrn): |
145 | FbTk::Theme(image_control.screenNumber()), | 146 | FbTk::Theme(image_control.screenNumber()), |
147 | m_screen(scrn), | ||
146 | m_background(new BackgroundItem(*this, "background", "Background")), | 148 | m_background(new BackgroundItem(*this, "background", "Background")), |
147 | m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())), | 149 | m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())), |
148 | m_image_ctrl(image_control) { | 150 | m_image_ctrl(image_control) { |
@@ -182,11 +184,9 @@ void RootTheme::reconfigTheme() { | |||
182 | return; | 184 | return; |
183 | } | 185 | } |
184 | 186 | ||
185 | if (!m_background->changed()) | 187 | if (!m_background->changed() || !m_screen) |
186 | return; | 188 | return; |
187 | 189 | ||
188 | m_background->setApplied(); | ||
189 | |||
190 | // style doesn't wish to change the background | 190 | // style doesn't wish to change the background |
191 | if (strstr(m_background->options().c_str(), "none") != 0) | 191 | if (strstr(m_background->options().c_str(), "none") != 0) |
192 | return; | 192 | return; |
@@ -196,7 +196,9 @@ void RootTheme::reconfigTheme() { | |||
196 | // | 196 | // |
197 | 197 | ||
198 | // root window helper | 198 | // root window helper |
199 | FbRootWindow rootwin(screenNum()); | 199 | FbRootWindow &rootwin = m_screen->rootWindow(); |
200 | |||
201 | m_background->setApplied(); | ||
200 | 202 | ||
201 | // handle background option in style | 203 | // handle background option in style |
202 | std::string filename = m_background->filename(); | 204 | std::string filename = m_background->filename(); |