diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-11-11 10:41:44 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-11-11 10:41:44 +0000 |
| commit | 24dd636f7318b0d21637aa7ffe253fe0ebf71f24 (patch) | |
| tree | 7cc64542881d853c81d06a966669a5246ee36008 /src/openbox.cc | |
| parent | e503323dcf36c7b4c173ddc0cd302b8642361f48 (diff) | |
watch for when screens cant be managed
Diffstat (limited to 'src/openbox.cc')
| -rw-r--r-- | src/openbox.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/openbox.cc b/src/openbox.cc index 5e0bff0c..93570c8c 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -128,9 +128,19 @@ Openbox::Openbox(int argc, char **argv) _cursors.ur_angle = XCreateFontCursor(otk::OBDisplay::display, XC_ur_angle); // initialize all the screens - _screens.push_back(new OBScreen(0, _config)); - _screens[0]->manageExisting(); - // XXX: "change to" the first workspace on the screen to initialize stuff + OBScreen *screen; + screen = new OBScreen(0, _config); + if (screen->managed()) { + _screens.push_back(screen); + _screens[0]->manageExisting(); + // XXX: "change to" the first workspace on the screen to initialize stuff + } else + delete screen; + + if (_screens.empty()) { + printf(_("No screens were found without a window manager. Exiting.\n")); + ::exit(1); + } _state = State_Normal; // done starting } |
