summaryrefslogtreecommitdiff
path: root/frontends/riscos/gui.c
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2021-08-15 05:44:52 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2022-05-27 15:09:48 +0100
commit862756a1a47553f317970f3a04fce3bd204792f6 (patch)
tree9fee318eb4bbf9a189bd2e17679a06a16bc9b0fd /frontends/riscos/gui.c
parentd51cf1a789e8d4b1527fa11553ffe059809511cb (diff)
downloadnetsurf-862756a1a47553f317970f3a04fce3bd204792f6.tar.gz
netsurf-862756a1a47553f317970f3a04fce3bd204792f6.tar.bz2
RISC OS: initialise font subsystem after Wimp_Initialise
If RUfl detects it is running in a Wimp task it will display a progress meter while scanning fonts. We had this behaviour until ~2017, when it became broken due to the font initialisation being moved before the call to Wimp_Initialise (because the hotlist display logic got moved to the treeview, which needs fonts set up) Move both the font and hotlist initialisation after the call to Wimp_Initialise to restore the desired behaviour.
Diffstat (limited to 'frontends/riscos/gui.c')
-rw-r--r--frontends/riscos/gui.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index f9268cac1..6b8f1a56b 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -1231,16 +1231,9 @@ static nserror gui_init(int argc, char** argv)
/* Initialise save complete functionality */
save_complete_init();
- /* Initialise the font subsystem */
- nsfont_init();
-
- /* Load in visited URLs, Cookies, and hostlist */
+ /* Load in visited URLs and Cookies */
urldb_load(nsoption_charp(url_path));
urldb_load_cookies(nsoption_charp(cookie_file));
- hotlist_init(nsoption_charp(hotlist_path),
- nsoption_bool(external_hotlists) ?
- NULL :
- nsoption_charp(hotlist_save));
/* Initialise with the wimp */
error = xwimp_initialise(wimp_VERSION_RO38, task_name,
@@ -1271,6 +1264,15 @@ static nserror gui_init(int argc, char** argv)
ro_message_register_route(message_WINDOW_INFO,
ro_msg_window_info);
+ /* Initialise the font subsystem (must be after Wimp_Initialise) */
+ nsfont_init();
+
+ /* Initialise the hotlist (must be after fonts) */
+ hotlist_init(nsoption_charp(hotlist_path),
+ nsoption_bool(external_hotlists) ?
+ NULL :
+ nsoption_charp(hotlist_save));
+
/* Initialise global information */
ro_gui_get_screen_properties();
ro_gui_wimp_get_desktop_font();