diff options
author | markt <markt> | 2007-01-03 18:59:43 (GMT) |
---|---|---|
committer | markt <markt> | 2007-01-03 18:59:43 (GMT) |
commit | e2e94031f962513c746857349e8511b296d25986 (patch) | |
tree | 932286e4949023ac8803671ca6398f4a71a4ef68 /src/Remember.cc | |
parent | aeac1b334441a348a411fc01a1568ece74b76a2f (diff) | |
download | fluxbox-e2e94031f962513c746857349e8511b296d25986.zip fluxbox-e2e94031f962513c746857349e8511b296d25986.tar.bz2 |
don't run [startup] items on restart
Diffstat (limited to 'src/Remember.cc')
-rw-r--r-- | src/Remember.cc | 21 |
1 files changed, 13 insertions, 8 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) { | |||
169 | bool handleStartupItem(const string &line, int offset) { | 169 | bool 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 |