mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-25 19:04:21 +03:00
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.
This commit is contained in:
parent
4dd5a9c114
commit
21f8f8170a
@ -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();
|
||||
|
||||
|
@ -87,8 +87,7 @@ monkey_prepare_input(void)
|
||||
g_source_attach((GSource *)gs, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
monkey_poll(bool active)
|
||||
void monkey_poll(void)
|
||||
{
|
||||
fd_set read_fd_set, write_fd_set, exc_fd_set;
|
||||
int max_fd;
|
||||
|
@ -21,6 +21,6 @@
|
||||
|
||||
void monkey_prepare_input(void);
|
||||
|
||||
void monkey_poll(bool active);
|
||||
void monkey_poll(void);
|
||||
|
||||
#endif /* NETSURF_MONKEY_POLL_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user