diff options
Diffstat (limited to 'libjava/gnu/gcj')
-rw-r--r-- | libjava/gnu/gcj/xlib/natXAnyEvent.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/gnu/gcj/xlib/natXAnyEvent.cc b/libjava/gnu/gcj/xlib/natXAnyEvent.cc index 0bef563..26d3b60 100644 --- a/libjava/gnu/gcj/xlib/natXAnyEvent.cc +++ b/libjava/gnu/gcj/xlib/natXAnyEvent.cc @@ -69,11 +69,14 @@ jboolean gnu::gcj::xlib::XAnyEvent::loadNext(jboolean block) int xfd = XConnectionNumber(dpy); int pipefd = pipe[0]; int n = (xfd > pipefd ? xfd : pipefd) + 1; + struct timeval timeout; + timeout.tv_usec = 100000; // 100ms timeout + timeout.tv_sec = 0; fd_set rfds; FD_ZERO(&rfds); FD_SET(xfd, &rfds); FD_SET(pipefd, &rfds); - int sel = _Jv_select (n, &rfds, NULL, NULL, NULL); + int sel = _Jv_select (n, &rfds, NULL, NULL, &timeout); if (sel > 0) { if (FD_ISSET(xfd, &rfds)) |