  #endif
  #endif
  
-@@ -689,14 +687,16 @@ void gui_poll(bool active)
+@@ -681,46 +679,32 @@ void nsbeos_pipe_message_top(BMessage *message, BWindow *_this, struct beos_scaf
+ void gui_poll(bool active)
+ {
+ 	//CALLED();
+-	CURLMcode code;
+-
+ 	fd_set read_fd_set, write_fd_set, exc_fd_set;
+-	int max_fd = 0;
+ 	struct timeval timeout;
  	unsigned int fd_count = 0;
- 	bool block = true;
- 
+-	bool block = true;
++	bigtime_t next_schedule = 0;
+ 
+-	if (browser_reformat_pending)
+-		block = false;
 +	schedule_run();
-+
- 	if (browser_reformat_pending)
- 		block = false;
- 
--	FD_ZERO(&read_fd_set);
--	FD_ZERO(&write_fd_set);
--	FD_ZERO(&exc_fd_set);
--
- 	if (active) {
-+		block = false; // there is network activity going on
-+		FD_ZERO(&read_fd_set);
-+		FD_ZERO(&write_fd_set);
-+		FD_ZERO(&exc_fd_set);
- 		code = curl_multi_fdset(fetch_curl_multi,
- 				&read_fd_set,
- 				&write_fd_set,
-@@ -709,7 +709,8 @@ void gui_poll(bool active)
+ 
+ 	FD_ZERO(&read_fd_set);
+ 	FD_ZERO(&write_fd_set);
+ 	FD_ZERO(&exc_fd_set);
+ 
+-	if (active) {
+-		code = curl_multi_fdset(fetch_curl_multi,
+-				&read_fd_set,
+-				&write_fd_set,
+-				&exc_fd_set,
+-				&max_fd);
+-		assert(code == CURLM_OK);
+-	}
+-
+ 	// our own event pipe
  	FD_SET(sEventPipe[0], &read_fd_set);
- 	max_fd = MAX(max_fd, sEventPipe[0] + 1);
- 
--
-+	// earliest_callback_timeout is set by the scheduler and tells us when the
-+	// next UI event should happen.
- 	bigtime_t next_schedule = earliest_callback_timeout - system_time();
- 	if (!block)
- 		next_schedule = 0LL; // now
-@@ -730,8 +731,6 @@ void gui_poll(bool active)
+-	max_fd = MAX(max_fd, sEventPipe[0] + 1);
+ 
+ 
+-	bigtime_t next_schedule = earliest_callback_timeout - system_time();
+-	if (!block)
+-		next_schedule = 0LL; // now
+-	if (block && earliest_callback_timeout != B_INFINITE_TIMEOUT)
+-		block = false;
++	// If there are pending events elsewhere, we should not be blocking
++	if ((!browser_reformat_pending) && (!active)) {
++		next_schedule = earliest_callback_timeout - system_time();
++
++	} // else, we're not allowed to sleep, there is other activity going on.
++
+ 	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);
++	fd_count = select(sEventPipe[0] + 1, &read_fd_set, &write_fd_set, &exc_fd_set, 
++		&timeout);
+ 
+ 	if (fd_count > 0 && FD_ISSET(sEventPipe[0], &read_fd_set)) {
+ 		BMessage *message;
+@@ -730,8 +714,6 @@ void gui_poll(bool active)
  			nsbeos_dispatch_event(message);
  	}
  

 
 	LOG(("Checking %ld callbacks to for deadline.", this_run->CountItems()));
diff --git a/beos/window.cpp b/beos/window.cpp
index 253b5d1..729d7b1 100644
--- a/beos/window.cpp
+++ b/beos/window.cpp
@@ -131,7 +131,7 @@ static GdkCursor *nsbeos_create_menu_cursor(void);

 			}
 			pos += BPoint(20, 20);
 			BScreen screen;
@@ -2038,14 +2168,13 @@ nsbeos_scaffolding *nsbeos_new_scaffolding(struct gui_window *toplevel)
 	rect = g->top_view->Bounds();
 	rect.bottom = rect.top + TOOLBAR_HEIGHT - 1;
 	rect.right = rect.right - DRAGGER_WIDTH;
