summaryrefslogtreecommitdiff
path: root/beos/gui.cpp
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-07-06 10:45:31 +0100
committerVincent Sanders <vince@kyllikki.org>2014-07-06 10:45:31 +0100
commit0f151e37cba454fcb863b6b38e1780f2b04be903 (patch)
tree5b0f84879eb2896158c4f3c4f82c0391c8ec3380 /beos/gui.cpp
parentf5c62c2291add5e6e3b8fc604831283e4883a3c6 (diff)
parent18aefabd20a16dda9ed5363088f0da5ada0d4431 (diff)
downloadnetsurf-0f151e37cba454fcb863b6b38e1780f2b04be903.tar.gz
netsurf-0f151e37cba454fcb863b6b38e1780f2b04be903.tar.bz2
Merge branch 'vince/reformatpending'
Conflicts: amiga/gui.c
Diffstat (limited to 'beos/gui.cpp')
-rw-r--r--beos/gui.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/beos/gui.cpp b/beos/gui.cpp
index eee56d8c6..cb7effead 100644
--- a/beos/gui.cpp
+++ b/beos/gui.cpp
@@ -719,7 +719,6 @@ static void gui_poll(bool active)
int max_fd;
struct timeval timeout;
unsigned int fd_count = 0;
- bool block = true;
bigtime_t next_schedule = 0;
/* get any active fetcher fd */
@@ -734,34 +733,23 @@ static void gui_poll(bool active)
// max of all the fds in the set, plus one for select()
max_fd = MAX(max_fd, sEventPipe[0]) + 1;
- // If there are pending events elsewhere, we should not be blocking
- if (!browser_reformat_pending) {
- if (earliest_callback_timeout != B_INFINITE_TIMEOUT) {
- next_schedule = earliest_callback_timeout - system_time();
- block = false;
- }
-
- // we're quite late already...
- if (next_schedule < 0)
- next_schedule = 0;
-
- } else {//we're not allowed to sleep, there is other activity going on.
- nsbeos_window_process_reformats();
- block = false;
+ // compute schedule timeout
+ if (earliest_callback_timeout != B_INFINITE_TIMEOUT) {
+ next_schedule = earliest_callback_timeout - system_time();
+ } else {
+ next_schedule = earliest_callback_timeout;
}
- /*
- LOG(("gui_poll: browser_reformat_pending:%d earliest_callback_timeout:%Ld"
- " next_schedule:%Ld block:%d ", browser_reformat_pending,
- earliest_callback_timeout, next_schedule, block));
- */
+ // we're quite late already...
+ if (next_schedule < 0)
+ next_schedule = 0;
timeout.tv_sec = (long)(next_schedule / 1000000LL);
timeout.tv_usec = (long)(next_schedule % 1000000LL);
//LOG(("gui_poll: select(%d, ..., %Ldus", max_fd, next_schedule));
fd_count = select(max_fd, &read_fd_set, &write_fd_set, &exc_fd_set,
- block ? NULL : &timeout);
+ &timeout);
//LOG(("select: %d\n", fd_count));
if (fd_count > 0 && FD_ISSET(sEventPipe[0], &read_fd_set)) {