+
+ XSetInputFocus(**otk::display, PointerRoot, RevertToNone,
+ CurrentTime);
+ XSync(**otk::display, false);
+
+ // this tends to block.. i honestly am not sure why. causing an x error in
+ // the shutdown process unblocks it. blackbox simply did a ::exit(0), so
+ // all im gunna do is the same.
+ //otk::display->destroy();
+
+ otk::Timer::destroy();
+ otk::RenderColor::destroy();
+
+ if (_restart) {
+ if (!_restart_prog.empty()) {
+ otk::putenv(otk::display->screenInfo(first_screen)->displayString());
+ execl("/bin/sh", "/bin/sh", "-c", _restart_prog.c_str(), NULL);
+ perror(_restart_prog.c_str());
+ }
+
+ // fall back in case the above execlp doesn't work
+ execvp(_argv[0], _argv);
+ execvp(otk::basename(_argv[0]).c_str(), _argv);
+ }