diff options
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 8b5d11f..c4e6559 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -303,7 +303,7 @@ Fluxbox::Fluxbox(int argc, char **argv, | |||
303 | // Because when the command is executed we shouldn't do reconfig directly | 303 | // Because when the command is executed we shouldn't do reconfig directly |
304 | // because it could affect ongoing menu stuff so we need to reconfig in | 304 | // because it could affect ongoing menu stuff so we need to reconfig in |
305 | // the next event "round". | 305 | // the next event "round". |
306 | FbTk::RefCount<FbTk::Command<void> > reconfig_cmd(new FbTk::SimpleCommand<Fluxbox>(*this, &Fluxbox::timed_reconfigure)); | 306 | FbTk::RefCount<FbTk::Command<void> > reconfig_cmd(new FbTk::SimpleCommand<Fluxbox>(*this, &Fluxbox::reconfigure)); |
307 | m_reconfig_timer.setTimeout(0, 1); | 307 | m_reconfig_timer.setTimeout(0, 1); |
308 | m_reconfig_timer.setCommand(reconfig_cmd); | 308 | m_reconfig_timer.setCommand(reconfig_cmd); |
309 | m_reconfig_timer.fireOnce(true); | 309 | m_reconfig_timer.fireOnce(true); |
@@ -435,8 +435,6 @@ Fluxbox::Fluxbox(int argc, char **argv, | |||
435 | //XSynchronize(disp, False); | 435 | //XSynchronize(disp, False); |
436 | sync(false); | 436 | sync(false); |
437 | 437 | ||
438 | m_reconfigure_wait = false; | ||
439 | |||
440 | ungrab(); | 438 | ungrab(); |
441 | 439 | ||
442 | m_starting = false; | 440 | m_starting = false; |
@@ -896,7 +894,7 @@ void Fluxbox::handleSignal(int signum) { | |||
896 | load_rc(); | 894 | load_rc(); |
897 | break; | 895 | break; |
898 | case SIGUSR2: | 896 | case SIGUSR2: |
899 | reconfigure(); | 897 | m_reconfig_timer.start(); |
900 | break; | 898 | break; |
901 | #endif | 899 | #endif |
902 | case SIGSEGV: | 900 | case SIGSEGV: |
@@ -1181,17 +1179,6 @@ void Fluxbox::load_rc() { | |||
1181 | *m_rc_stylefile = DEFAULTSTYLE; | 1179 | *m_rc_stylefile = DEFAULTSTYLE; |
1182 | } | 1180 | } |
1183 | 1181 | ||
1184 | void Fluxbox::reconfigure() { | ||
1185 | load_rc(); | ||
1186 | m_reconfigure_wait = true; | ||
1187 | m_reconfig_timer.start(); | ||
1188 | } | ||
1189 | |||
1190 | |||
1191 | void Fluxbox::real_reconfigure() { | ||
1192 | STLUtil::forAll(m_screen_list, mem_fun(&BScreen::reconfigure)); | ||
1193 | } | ||
1194 | |||
1195 | BScreen *Fluxbox::findScreen(int id) { | 1182 | BScreen *Fluxbox::findScreen(int id) { |
1196 | 1183 | ||
1197 | BScreen* result = 0; | 1184 | BScreen* result = 0; |
@@ -1204,11 +1191,12 @@ BScreen *Fluxbox::findScreen(int id) { | |||
1204 | return result; | 1191 | return result; |
1205 | } | 1192 | } |
1206 | 1193 | ||
1207 | void Fluxbox::timed_reconfigure() { | 1194 | void Fluxbox::reconfigure() { |
1208 | if (m_reconfigure_wait) | 1195 | std::auto_ptr<FbTk::Lua> t = m_l; |
1209 | real_reconfigure(); | 1196 | m_l.reset(new Lua); |
1210 | 1197 | m_resourcemanager.setLua(*m_l); | |
1211 | m_reconfigure_wait = false; | 1198 | load_rc(); |
1199 | STLUtil::forAll(m_screen_list, mem_fun(&BScreen::reconfigure)); | ||
1212 | } | 1200 | } |
1213 | 1201 | ||
1214 | void Fluxbox::revertFocus() { | 1202 | void Fluxbox::revertFocus() { |