summaryrefslogtreecommitdiff
path: root/src/drivers/Unix/Fl_Unix_System_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-06-03 08:23:04 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-06-03 08:23:04 +0200
commit85be70efa516bccb375bd7c011a2882a064c24da (patch)
treed8dd4c770edf71ddda23b2851745aba5b3bdbb8f /src/drivers/Unix/Fl_Unix_System_Driver.cxx
parent9a5e3b95b8abe132c36eb58a55f0e5188c726e20 (diff)
Restore use of build option FLTK_USE_POLL
Diffstat (limited to 'src/drivers/Unix/Fl_Unix_System_Driver.cxx')
-rw-r--r--src/drivers/Unix/Fl_Unix_System_Driver.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/drivers/Unix/Fl_Unix_System_Driver.cxx b/src/drivers/Unix/Fl_Unix_System_Driver.cxx
index 2b15882a1..443838c5d 100644
--- a/src/drivers/Unix/Fl_Unix_System_Driver.cxx
+++ b/src/drivers/Unix/Fl_Unix_System_Driver.cxx
@@ -723,18 +723,18 @@ void Fl_Unix_System_Driver::add_fd(int n, int events, void (*cb)(int, void*), vo
# if USE_POLL
pollfd *tpoll;
- if (!pollfds) tpoll = (pollfd*)malloc(fd_array_size*sizeof(pollfd));
- else tpoll = (pollfd*)realloc(pollfds, fd_array_size*sizeof(pollfd));
+ if (!Fl_Unix_Screen_Driver::pollfds) tpoll = (pollfd*)malloc(fd_array_size*sizeof(pollfd));
+ else tpoll = (pollfd*)realloc(Fl_Unix_Screen_Driver::pollfds, fd_array_size*sizeof(pollfd));
if (!tpoll) return;
- pollfds = tpoll;
+ Fl_Unix_Screen_Driver::pollfds = tpoll;
# endif
}
Fl_Unix_Screen_Driver::fd[i].cb = cb;
Fl_Unix_Screen_Driver::fd[i].arg = v;
# if USE_POLL
- pollfds[i].fd = n;
- pollfds[i].events = events;
+ Fl_Unix_Screen_Driver::pollfds[i].fd = n;
+ Fl_Unix_Screen_Driver::pollfds[i].events = events;
# else
Fl_Unix_Screen_Driver::fd[i].fd = n;
Fl_Unix_Screen_Driver::fd[i].events = events;
@@ -756,10 +756,10 @@ void Fl_Unix_System_Driver::remove_fd(int n, int events) {
# endif
for (i=j=0; i<Fl_Unix_Screen_Driver::nfds; i++) {
# if USE_POLL
- if (pollfds[i].fd == n) {
- int e = pollfds[i].events & ~events;
+ if (Fl_Unix_Screen_Driver::pollfds[i].fd == n) {
+ int e = Fl_Unix_Screen_Driver::pollfds[i].events & ~events;
if (!e) continue; // if no events left, delete this fd
- pollfds[j].events = e;
+ Fl_Unix_Screen_Driver::pollfds[j].events = e;
}
# else
if (Fl_Unix_Screen_Driver::fd[i].fd == n) {
@@ -773,7 +773,7 @@ void Fl_Unix_System_Driver::remove_fd(int n, int events) {
if (j<i) {
Fl_Unix_Screen_Driver::fd[j] = Fl_Unix_Screen_Driver::fd[i];
# if USE_POLL
- pollfds[j] = pollfds[i];
+ Fl_Unix_Screen_Driver::pollfds[j] = Fl_Unix_Screen_Driver::pollfds[i];
# endif
}
j++;