summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Remember.cc21
-rw-r--r--src/fluxbox.cc4
2 files changed, 15 insertions, 10 deletions
diff --git a/src/Remember.cc b/src/Remember.cc
index d39cd3e..f084677 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -169,7 +169,7 @@ FbTk::Menu *createRememberMenu(BScreen &screen) {
169bool handleStartupItem(const string &line, int offset) { 169bool handleStartupItem(const string &line, int offset) {
170 int next = 0; 170 int next = 0;
171 string str; 171 string str;
172 unsigned int screen = 0; 172 unsigned int screen = Fluxbox::instance()->keyScreen()->screenNumber();
173 173
174 // accept some options, for now only "screen=NN" 174 // accept some options, for now only "screen=NN"
175 // these option are given in parentheses before the command 175 // these option are given in parentheses before the command
@@ -206,15 +206,20 @@ bool handleStartupItem(const string &line, int offset) {
206 if (next <= 0) { 206 if (next <= 0) {
207 cerr<<"Error parsing [startup] at column "<<offset<<" - expecting {command}."<<endl; 207 cerr<<"Error parsing [startup] at column "<<offset<<" - expecting {command}."<<endl;
208 return false; 208 return false;
209 } else { 209 }
210 FbCommands::ExecuteCmd *tmp_exec_cmd = new FbCommands::ExecuteCmd(str, screen); 210
211 // don't run command if fluxbox is restarting
212 if (Fluxbox::instance()->findScreen(screen)->isRestart())
213 // the line was successfully read; we just didn't use it
214 return true;
215
216 FbCommands::ExecuteCmd *tmp_exec_cmd = new FbCommands::ExecuteCmd(str, screen);
211#ifdef DEBUG 217#ifdef DEBUG
212 cerr<<"Executing startup command '"<<str<<"' on screen "<<screen<<endl; 218 cerr<<"Executing startup command '"<<str<<"' on screen "<<screen<<endl;
213#endif // DEBUG 219#endif // DEBUG
214 tmp_exec_cmd->execute(); 220 tmp_exec_cmd->execute();
215 delete tmp_exec_cmd; 221 delete tmp_exec_cmd;
216 return true; 222 return true;
217 }
218}; 223};
219 224
220}; // end anonymous namespace 225}; // end anonymous namespace
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 16e27b8..a8290e5 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -404,6 +404,8 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
404 "Error message when no unmanaged screens found - usually means another window manager is running"); 404 "Error message when no unmanaged screens found - usually means another window manager is running");
405 } 405 }
406 406
407 m_keyscreen = m_mousescreen = m_screen_list.front();
408
407 // parse apps file after creating screens but before creating windows 409 // parse apps file after creating screens but before creating windows
408#ifdef REMEMBER 410#ifdef REMEMBER
409 addAtomHandler(new Remember(), "remember"); // for remembering window attribs 411 addAtomHandler(new Remember(), "remember"); // for remembering window attribs
@@ -417,8 +419,6 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
417 419
418 XAllowEvents(disp, ReplayPointer, CurrentTime); 420 XAllowEvents(disp, ReplayPointer, CurrentTime);
419 421
420 m_keyscreen = m_mousescreen = m_screen_list.front();
421
422 // setup theme manager to have our style file ready to be scanned 422 // setup theme manager to have our style file ready to be scanned
423 FbTk::ThemeManager::instance().load(getStyleFilename(), getStyleOverlayFilename()); 423 FbTk::ThemeManager::instance().load(getStyleFilename(), getStyleOverlayFilename());
424 424