summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-10-12 09:58:54 +0100
committerVincent Sanders <vince@kyllikki.org>2014-10-12 10:05:01 +0100
commit265f63e67968cfcc23e785fe7b8b38a7961572f1 (patch)
tree0426397a9bc2a0fef46261bc8533890ae2bba4ff
parent1a2040bc726b151a1d1b1459ae0fbccef66d7d82 (diff)
downloadnetsurf-265f63e67968cfcc23e785fe7b8b38a7961572f1.tar.gz
netsurf-265f63e67968cfcc23e785fe7b8b38a7961572f1.tar.bz2
remove use of deprecated netsurf_quit variable
The core no longer needs to run the event polling loop as fetches are now scheduler driven. This is part of a series which will ultimately remove netsurf_poll callback altogether. The Amiga maintainer probably wants to look at moving the ami_quit signalling inside ami_handle_msg() to further reduce overhead.
-rw-r--r--amiga/gui.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index f8330813e..c01e29499 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -150,6 +150,8 @@
#define EXTRADOWN (IECODE_5TH_BUTTON)
#define EXTRAUP (IECODE_5TH_BUTTON | IECODE_UP_PREFIX)
+static bool ami_quit = false;
+
extern struct gui_utf8_table *amiga_utf8_table;
struct ami_gui_tb_userdata {
@@ -973,7 +975,7 @@ static void gui_init2(int argc, char** argv)
IDoMethod(arexx_obj,AM_EXECUTE,sendcmd,"NETSURF",NULL,NULL,NULL,NULL);
FreeVec(sendcmd);
- netsurf_quit=true;
+ ami_quit=true;
return;
}
@@ -2502,12 +2504,6 @@ void ami_get_msg(void)
ami_quit_netsurf_delayed();
}
-
-static void gui_poll(bool active)
-{
- ami_get_msg();
-}
-
void ami_change_tab(struct gui_window_2 *gwin, int direction)
{
struct Node *tab_node = gwin->bw->window->tab_node;
@@ -2629,7 +2625,7 @@ void ami_quit_netsurf(void)
if(IsMinListEmpty(window_list)) {
/* last window closed, so exit */
- netsurf_quit = true;
+ ami_quit = true;
}
}
@@ -2696,7 +2692,7 @@ void ami_try_quit(void)
if(nsoption_bool(close_no_quit) == false)
{
- netsurf_quit = true;
+ ami_quit = true;
return;
}
else
@@ -5109,7 +5105,6 @@ static struct gui_search_web_table amiga_search_web_table = {
};
static struct gui_browser_table amiga_browser_table = {
- .poll = gui_poll,
.schedule = ami_schedule,
.quit = gui_quit,
@@ -5224,7 +5219,9 @@ int main(int argc, char** argv)
AddPart(script, nsoption_charp(arexx_startup), 1024);
ami_arexx_execute(script);
- netsurf_main_loop();
+ while (!ami_quit) {
+ ami_get_msg();
+ }
strlcpy(script, nsoption_charp(arexx_dir), 1024);
AddPart(script, nsoption_charp(arexx_shutdown), 1024);