diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-12-31 00:14:44 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-12-31 00:14:44 +0000 |
commit | d90e82d3f1c0ed0cdd665899c754b655f661976d (patch) | |
tree | d751b1e5b97e261258ef324bd13b3713b60867c8 /frontends | |
parent | 4893a9f9af8013fb81cdb81a4d49043719d0b851 (diff) | |
download | netsurf-d90e82d3f1c0ed0cdd665899c754b655f661976d.tar.gz netsurf-d90e82d3f1c0ed0cdd665899c754b655f661976d.tar.bz2 |
Simplify closing of windows on quit
If they have a close callback it will be called.
Some windows are attached to browser windows and closed elsewhere without using the callbacks.
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/amiga/gui.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c index 97b0271e0..b7e5faa85 100644 --- a/frontends/amiga/gui.c +++ b/frontends/amiga/gui.c @@ -2958,7 +2958,6 @@ void ami_quit_netsurf(void) struct nsObject *node; struct nsObject *nnode; struct ami_generic_window *w; - struct gui_window_2 *gwin; /* Disable the multiple tabs open warning */ nsoption_set_bool(tab_close_warn, false); @@ -2970,26 +2969,12 @@ void ami_quit_netsurf(void) nnode=(struct nsObject *)GetSucc((struct Node *)node); w = node->objstruct; - switch(node->Type) { - case AMINS_TVWINDOW: - w->tbl->close(w); - break; - - case AMINS_WINDOW: - /* This also closes windows that are attached to the - * gui_window, such as local history and find. */ - gwin = (struct gui_window_2 *)w; + if(w->tbl->close != NULL) { + if(node->Type == AMINS_WINDOW) { + struct gui_window_2 *gwin = (struct gui_window_2 *)w; ShowWindow(gwin->win, WINDOW_BACKMOST); // do we need this?? - w->tbl->close(w); - break; - - case AMINS_GUIOPTSWINDOW: - w->tbl->close(w); - break; - - case AMINS_DLWINDOW: - w->tbl->close(w); - break; + } + w->tbl->close(w); } } while((node = nnode)); |