X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/333f4ac09dca8181d39c28ab38dc3069d006fcae..e777924b358ae352f30881249f681ebb7a3ce089:/src/x11/evtloop.cpp diff --git a/src/x11/evtloop.cpp b/src/x11/evtloop.cpp index 10c61e19b5..15e344b6f0 100644 --- a/src/x11/evtloop.cpp +++ b/src/x11/evtloop.cpp @@ -239,6 +239,16 @@ bool wxEventLoop::Dispatch() if (XPending((Display*) wxGetDisplay()) == 0) { +#if wxUSE_NANOX + GR_TIMEOUT timeout = 10; // Milliseconds + // Wait for next event, or timeout + GrGetNextEventTimeout(& event, timeout); + + // Fall through to ProcessEvent. + // we'll assume that ProcessEvent will just ignore + // the event if there was a timeout and no event. + +#else struct timeval tv; tv.tv_sec=0; tv.tv_usec=10000; // TODO make this configurable @@ -256,6 +266,7 @@ bool wxEventLoop::Dispatch() // An event was pending, so get it XNextEvent((Display*) wxGetDisplay(), & event); } +#endif } else { XNextEvent((Display*) wxGetDisplay(), & event);