diff options
| -rw-r--r-- | CHANGES | 1 | ||||
| -rw-r--r-- | src/Fl_x.cxx | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,6 @@ CHANGES IN FLTK 1.3.0 + - Fixed max. fd calculation, if USE_POLL is enabled (STR #2324) - Fixed clipping for offscreen rendering (OSX, STR #2330) - Added printing support (Fl_Printer class and friends) for native printing on Windows and Mac OS X, PostScript printing on X11 diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index c66f71455..aa046d757 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -136,7 +136,9 @@ void Fl::add_fd(int n, void (*cb)(int, void*), void* v) { void Fl::remove_fd(int n, int events) { int i,j; +# if !USE_POLL maxfd = -1; // recalculate maxfd on the fly +# endif for (i=j=0; i<nfds; i++) { # if USE_POLL if (pollfds[i].fd == n) { @@ -150,8 +152,8 @@ void Fl::remove_fd(int n, int events) { if (!e) continue; // if no events left, delete this fd fd[i].events = e; } -# endif if (fd[i].fd > maxfd) maxfd = fd[i].fd; +# endif // move it down in the array if necessary: if (j<i) { fd[j] = fd[i]; |
