+ // load config values
+ //python_exec(SCRIPTDIR"/config.py"); // load openbox config values
+ // run all of the python scripts
+ //python_exec(SCRIPTDIR"/builtins.py"); // builtin callbacks
+ //python_exec(SCRIPTDIR"/focus.py"); // focus helpers
+ // run the user's script or the system defaults if that fails
+ if (!python_exec(_scriptfilepath.c_str()))
+ python_exec(SCRIPTDIR"/defaults.py"); // system default bahaviors
+
+ // initialize all the screens
+ for (int i = 0, max = ScreenCount(**otk::display); i < max; ++i) {
+ Screen *screen;
+ if (_single && i != DefaultScreen(**otk::display)) {
+ _screens.push_back(0);
+ continue;
+ }
+ screen = new Screen(i);
+ if (screen->managed())
+ _screens.push_back(screen);
+ else {
+ delete screen;
+ _screens.push_back(0);
+ }
+ }
+
+ if (_screens.empty()) {
+ printf(_("No screens were found without a window manager. Exiting.\n"));
+ ::exit(1);
+ }
+
+ ScreenList::iterator it, end = _screens.end();
+ for (it = _screens.begin(); it != end; ++it) {
+ (*it)->manageExisting();
+ }
+
+ // grab any keys set up before the screens existed
+ _bindings->grabKeys(true);
+
+ // set up input focus
+ _focused_screen = _screens[0];
+ setFocusedClient(0);