summaryrefslogtreecommitdiff
path: root/monkey/main.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-10-12 21:18:17 +0100
committerVincent Sanders <vince@kyllikki.org>2014-10-12 21:18:17 +0100
commit21f8f8170a7ad9748a21703f8397349d68f3e660 (patch)
treebd15e5054c8690385069a1ab1ee340dc3a20a78c /monkey/main.c
parent4dd5a9c114fa5d0c8ef559bab84b51158d75ab93 (diff)
downloadnetsurf-21f8f8170a7ad9748a21703f8397349d68f3e660.tar.gz
netsurf-21f8f8170a7ad9748a21703f8397349d68f3e660.tar.bz2
remove use of deprecated netsurf_quit variable in monkey
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.
Diffstat (limited to 'monkey/main.c')
-rw-r--r--monkey/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/monkey/main.c b/monkey/main.c
index 6a7c1d663..803372c66 100644
--- a/monkey/main.c
+++ b/monkey/main.c
@@ -39,6 +39,8 @@
char **respaths; /** resource search path vector */
+static bool monkey_done = false;
+
/* Stolen from gtk/gui.c */
static char **
nsmonkey_init_resource(const char *resource_path)
@@ -75,7 +77,7 @@ static nserror gui_launch_url(struct nsurl *url)
static void quit_handler(int argc, char **argv)
{
- netsurf_quit = true;
+ monkey_done = true;
}
/**
@@ -106,7 +108,6 @@ static bool nslog_stream_configure(FILE *fptr)
}
static struct gui_browser_table monkey_browser_table = {
- .poll = monkey_poll,
.schedule = monkey_schedule,
.quit = monkey_quit,
@@ -176,7 +177,11 @@ main(int argc, char **argv)
monkey_register_handler("WINDOW", monkey_window_handle_command);
fprintf(stdout, "GENERIC STARTED\n");
- netsurf_main_loop();
+
+ while (!monkey_done) {
+ monkey_poll();
+ }
+
fprintf(stdout, "GENERIC CLOSING_DOWN\n");
monkey_kill_browser_windows();