diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | doc/asciidoc/fluxbox.txt | 6 | ||||
-rw-r--r-- | src/Remember.cc | 21 | ||||
-rw-r--r-- | src/fluxbox.cc | 4 |
4 files changed, 21 insertions, 13 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0rc3: | 2 | Changes for 1.0rc3: |
3 | *07/01/03: | ||
4 | * Don't run [startup] items in apps file on fluxbox restart (Mark) | ||
5 | Remember.cc fluxbox.cc | ||
3 | *07/01/02: | 6 | *07/01/02: |
4 | * Replace `which' in fbsetbg and fbgm with `command -v' (Mark) | 7 | * Replace `which' in fbsetbg and fbgm with `command -v' (Mark) |
5 | util/fbsetbg fluxbox-generate_menu.in | 8 | util/fbsetbg fluxbox-generate_menu.in |
diff --git a/doc/asciidoc/fluxbox.txt b/doc/asciidoc/fluxbox.txt index 2e143ca..6533e07 100644 --- a/doc/asciidoc/fluxbox.txt +++ b/doc/asciidoc/fluxbox.txt | |||
@@ -1528,9 +1528,9 @@ curly brackets: | |||
1528 | be saved when the window is closed. | 1528 | be saved when the window is closed. |
1529 | 1529 | ||
1530 | The apps file also allows you to specify applications that should be started | 1530 | The apps file also allows you to specify applications that should be started |
1531 | on fluxbox startup using [startup] (options) {application} lines. Options | 1531 | on fluxbox startup using [startup] (options) {command} lines. Currently, the |
1532 | could be used to specify the screen, not the workspace, on which the | 1532 | only valid option is (screen=NN), where NN is the screen number on which the |
1533 | application should be started. | 1533 | command should be run. |
1534 | 1534 | ||
1535 | Finally, you can set windows to group together by using the `apps' file. This | 1535 | Finally, you can set windows to group together by using the `apps' file. This |
1536 | can be achieved with regular expressions using: | 1536 | can be achieved with regular expressions using: |
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 |
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 | ||