summaryrefslogtreecommitdiff
path: root/riscos/gui.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-03-10 22:47:37 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-03-10 22:47:37 +0000
commit4a950fcbf7e7752c2b38a52ed197a1d873095fb5 (patch)
tree17f67efd45cb74add626b7704f113dd164c49ad0 /riscos/gui.c
parentee958f59832b1f1bd77b0a4d15bcfe28b21782d1 (diff)
downloadnetsurf-4a950fcbf7e7752c2b38a52ed197a1d873095fb5.tar.gz
netsurf-4a950fcbf7e7752c2b38a52ed197a1d873095fb5.tar.bz2
Only run the scheduler on null poll events.
Ensure the status bar widget treats its text as const. Fix erroneous free of status bar text in status bar widget destructor. The status bar text is now owned by the core. Schedule a callback to request a redraw from the Wimp when setting status bar text. The previous approach could lead to the Wimp having a long queue of redraw events to issue to us, thus preventing any other application being scheduled. The above changes are based on a patch from Rik Griffin. svn path=/trunk/netsurf/; revision=10126
Diffstat (limited to 'riscos/gui.c')
-rw-r--r--riscos/gui.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/riscos/gui.c b/riscos/gui.c
index fa1158ad5..64276b36b 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -959,10 +959,19 @@ void gui_poll(bool active)
} else {
event = wimp_poll(wimp_MASK_NULL | mask, &block, 0);
}
+
xhourglass_on();
gui_last_poll = clock();
ro_gui_handle_event(event, &block);
- schedule_run();
+
+ /* Only run scheduled callbacks on a null poll
+ * We cannot do this in the null event handler, as that may be called
+ * from gui_multitask(). Scheduled callbacks must only be run from the
+ * top-level.
+ */
+ if (event == wimp_NULL_REASON_CODE)
+ schedule_run();
+
ro_gui_window_update_boxes();
if (browser_reformat_pending && event == wimp_NULL_REASON_CODE)