From cbf423d4c60ff145246851dd36315833a8581c5b Mon Sep 17 00:00:00 2001 From: Chris Young Date: Mon, 10 Feb 2014 20:40:08 +0000 Subject: [PATCH] Try quitting after downloading if there are no windows open --- amiga/download.c | 1 + amiga/gui.c | 2 ++ amiga/gui.h | 1 + 3 files changed, 4 insertions(+) diff --git a/amiga/download.c b/amiga/download.c index a716d3862..1d10e926f 100644 --- a/amiga/download.c +++ b/amiga/download.c @@ -282,6 +282,7 @@ static void gui_download_window_done(struct gui_download_window *dw) nsurl_unref(url); } } + ami_try_quit(); /* In case the only window open was this download */ } static void gui_download_window_error(struct gui_download_window *dw, diff --git a/amiga/gui.c b/amiga/gui.c index 995c6f8d0..63d355738 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -2792,6 +2792,8 @@ void ami_gui_close_screen(struct Screen *scrn, BOOL locked_screen, BOOL donotwai void ami_try_quit(void) { + if(!IsMinListEmpty(window_list)) return; + if(nsoption_bool(close_no_quit) == false) { netsurf_quit = true; diff --git a/amiga/gui.h b/amiga/gui.h index 947066063..ad187500a 100755 --- a/amiga/gui.h +++ b/amiga/gui.h @@ -153,6 +153,7 @@ struct gui_window void ami_get_msg(void); void ami_close_all_tabs(struct gui_window_2 *gwin); +void ami_try_quit(void); void ami_quit_netsurf(void); void ami_schedule_redraw(struct gui_window_2 *gwin, bool full_redraw); STRPTR ami_locale_langs(void);