check for shutdown before waiting for timers
This commit is contained in:
parent
2627b85226
commit
703ef4df22
1 changed files with 3 additions and 1 deletions
|
@ -319,9 +319,11 @@ void Openbox::showHelp()
|
||||||
|
|
||||||
void Openbox::eventLoop()
|
void Openbox::eventLoop()
|
||||||
{
|
{
|
||||||
while (!_shutdown) {
|
while (true) {
|
||||||
dispatchEvents(); // from otk::EventDispatcher
|
dispatchEvents(); // from otk::EventDispatcher
|
||||||
XFlush(otk::Display::display); // flush here before we go wait for timers
|
XFlush(otk::Display::display); // flush here before we go wait for timers
|
||||||
|
// don't wait if we're to shutdown
|
||||||
|
if (_shutdown) break;
|
||||||
_timermanager.fire(!_sync); // wait if not in sync mode
|
_timermanager.fire(!_sync); // wait if not in sync mode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue