Author: AlbrechtS
Date: 2010-04-05 12:11:49 -0700 (Mon, 05 Apr 2010)
New Revision: 7431
Log:
Fixed max. fd calculation, if USE_POLL is enabled (STR #2324).
This could maybe be removed completely, but anyway...
Modified:
branches/branch-1.3/CHANGES
branches/branch-1.3/src/Fl_x.cxx
Modified: branches/branch-1.3/CHANGES
===================================================================
--- branches/branch-1.3/CHANGES 2010-04-05 19:11:31 UTC (rev 7430)
+++ branches/branch-1.3/CHANGES 2010-04-05 19:11:49 UTC (rev 7431)
@@ -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
Modified: branches/branch-1.3/src/Fl_x.cxx
===================================================================
--- branches/branch-1.3/src/Fl_x.cxx 2010-04-05 19:11:31 UTC (rev 7430)
+++ branches/branch-1.3/src/Fl_x.cxx 2010-04-05 19:11:49 UTC (rev 7431)
@@ -136,7 +136,9 @@
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 @@
if (!e) continue; // if no events left, delete this fd
fd[i].events = e;
}
+ if (fd[i].fd > maxfd) maxfd = fd[i].fd;
# endif
- if (fd[i].fd > maxfd) maxfd = fd[i].fd;
// move it down in the array if necessary:
if (j<i) {
fd[j] = fd[i];
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit