From ea851ba788cdaad7793763fbb64ee46442d0ebd4 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 18 Oct 2014 21:14:07 +0100 Subject: Keep throbber status in the gui_window. --- riscos/gui.h | 1 + riscos/window.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'riscos') diff --git a/riscos/gui.h b/riscos/gui.h index 95b59c124..f402fc925 100644 --- a/riscos/gui.h +++ b/riscos/gui.h @@ -87,6 +87,7 @@ struct gui_window { int old_width; /**< Width when last opened / os units. */ int old_height; /**< Height when last opened / os units. */ bool update_extent; /**< Update the extent on next opening */ + bool active; /**< Whether the throbber should be active */ char title[256]; /**< Buffer for window title. */ diff --git a/riscos/window.c b/riscos/window.c index b6c7cca30..bce6721ad 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -427,6 +427,7 @@ static struct gui_window *gui_window_create(struct browser_window *bw, g->old_width = 0; g->old_height = 0; g->update_extent = true; + g->active = false; strcpy(g->title, "NetSurf"); g->iconise_icon = -1; g->scale = 1.0; @@ -1073,6 +1074,7 @@ static void gui_window_start_throbber(struct gui_window *g) ro_gui_menu_refresh(ro_gui_browser_window_menu); if (g->toolbar != NULL) ro_toolbar_start_throbbing(g->toolbar); + g->active = true; } @@ -1089,6 +1091,7 @@ static void gui_window_stop_throbber(struct gui_window *g) ro_gui_menu_refresh(ro_gui_browser_window_menu); if (g->toolbar != NULL) ro_toolbar_stop_throbbing(g->toolbar); + g->active = false; } /** @@ -4287,7 +4290,7 @@ void ro_gui_throb(void) struct browser_window *top; for (g = window_list; g; g = g->next) { - if (!g->bw->throbbing) + if (!g->active) continue; for (top = g->bw; top->parent; top = top->parent); if (top->window != NULL && top->window->toolbar != NULL) -- cgit v1.2.3