don't run [startup] items if fluxbox fails to load
This commit is contained in:
parent
e9dd7670f3
commit
d6a3af53ff
3 changed files with 33 additions and 25 deletions
|
@ -2,6 +2,8 @@
|
|||
Changes for 1.0rc3:
|
||||
*07/01/01:
|
||||
* Happy New Year!
|
||||
* Don't run [startup] items in apps file if fluxbox fails to start (Mark)
|
||||
fluxbox.cc/hh
|
||||
* Don't run [startup] items in apps file on reconfigure (Mark)
|
||||
Remember.cc
|
||||
* Fix data type of data passed to set _NET_FRAME_EXTENTS (Simon)
|
||||
|
|
|
@ -314,9 +314,6 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
|||
load_rc();
|
||||
|
||||
// setup atom handlers before we create any windows
|
||||
#ifdef REMEMBER
|
||||
addAtomHandler(new Remember(), "remember"); // for remembering window attribs
|
||||
#endif // REMEMBER
|
||||
#ifdef USE_NEWWMSPEC
|
||||
addAtomHandler(new Ewmh(), "ewmh"); // for Extended window manager atom support
|
||||
#endif // USE_NEWWMSPEC
|
||||
|
@ -382,12 +379,24 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
|||
}
|
||||
}
|
||||
|
||||
// init all "screens"
|
||||
for(size_t s = 0; s < screens.size(); s++)
|
||||
initScreen(screens[s]);
|
||||
// create screens
|
||||
for (size_t s = 0; s < screens.size(); s++) {
|
||||
char scrname[128], altscrname[128];
|
||||
sprintf(scrname, "session.screen%d", screens[s]);
|
||||
sprintf(altscrname, "session.Screen%d", screens[s]);
|
||||
BScreen *screen = new BScreen(m_screen_rm.lock(),
|
||||
scrname, altscrname,
|
||||
screens[s], getNumberOfLayers());
|
||||
|
||||
XAllowEvents(disp, ReplayPointer, CurrentTime);
|
||||
// already handled
|
||||
if (! screen->isScreenManaged()) {
|
||||
delete screen;
|
||||
continue;
|
||||
}
|
||||
|
||||
// add to our list
|
||||
m_screen_list.push_back(screen);
|
||||
}
|
||||
|
||||
if (m_screen_list.empty()) {
|
||||
throw _FB_CONSOLETEXT(Fluxbox, ErrorNoScreens,
|
||||
|
@ -395,6 +404,19 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
|||
"Error message when no unmanaged screens found - usually means another window manager is running");
|
||||
}
|
||||
|
||||
// parse apps file after creating screens but before creating windows
|
||||
#ifdef REMEMBER
|
||||
addAtomHandler(new Remember(), "remember"); // for remembering window attribs
|
||||
#endif // REMEMBER
|
||||
|
||||
// init all "screens"
|
||||
ScreenList::iterator it = m_screen_list.begin();
|
||||
ScreenList::iterator it_end = m_screen_list.end();
|
||||
for(; it != it_end; ++it)
|
||||
initScreen(*it);
|
||||
|
||||
XAllowEvents(disp, ReplayPointer, CurrentTime);
|
||||
|
||||
m_keyscreen = m_mousescreen = m_screen_list.front();
|
||||
|
||||
// setup theme manager to have our style file ready to be scanned
|
||||
|
@ -461,24 +483,9 @@ Fluxbox::~Fluxbox() {
|
|||
}
|
||||
|
||||
|
||||
int Fluxbox::initScreen(int scrnr) {
|
||||
void Fluxbox::initScreen(BScreen *screen) {
|
||||
|
||||
Display* disp = display();
|
||||
char scrname[128], altscrname[128];
|
||||
sprintf(scrname, "session.screen%d", scrnr);
|
||||
sprintf(altscrname, "session.Screen%d", scrnr);
|
||||
BScreen *screen = new BScreen(m_screen_rm.lock(),
|
||||
scrname, altscrname,
|
||||
scrnr, getNumberOfLayers());
|
||||
|
||||
// already handled
|
||||
if (! screen->isScreenManaged()) {
|
||||
delete screen;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// add to our list
|
||||
m_screen_list.push_back(screen);
|
||||
|
||||
// now we can create menus (which needs this screen to be in screen_list)
|
||||
screen->initMenus();
|
||||
|
@ -534,7 +541,6 @@ int Fluxbox::initScreen(int scrnr) {
|
|||
screen->slit()->show();
|
||||
#endif // SLIT
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ public:
|
|||
//WinClient *searchGroup(Window);
|
||||
WinClient *searchWindow(Window);
|
||||
|
||||
int initScreen(int screen_nr);
|
||||
void initScreen(BScreen *screen);
|
||||
BScreen *searchScreen(Window w);
|
||||
|
||||
unsigned int getDoubleClickInterval() const { return *m_rc_double_click_interval; }
|
||||
|
|
Loading…
Reference in a new issue