mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-16 06:24:24 +03:00
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.
This commit is contained in:
parent
4893a9f9af
commit
d90e82d3f1
@ -2958,7 +2958,6 @@ void ami_quit_netsurf(void)
|
|||||||
struct nsObject *node;
|
struct nsObject *node;
|
||||||
struct nsObject *nnode;
|
struct nsObject *nnode;
|
||||||
struct ami_generic_window *w;
|
struct ami_generic_window *w;
|
||||||
struct gui_window_2 *gwin;
|
|
||||||
|
|
||||||
/* Disable the multiple tabs open warning */
|
/* Disable the multiple tabs open warning */
|
||||||
nsoption_set_bool(tab_close_warn, false);
|
nsoption_set_bool(tab_close_warn, false);
|
||||||
@ -2970,26 +2969,12 @@ void ami_quit_netsurf(void)
|
|||||||
nnode=(struct nsObject *)GetSucc((struct Node *)node);
|
nnode=(struct nsObject *)GetSucc((struct Node *)node);
|
||||||
w = node->objstruct;
|
w = node->objstruct;
|
||||||
|
|
||||||
switch(node->Type) {
|
if(w->tbl->close != NULL) {
|
||||||
case AMINS_TVWINDOW:
|
if(node->Type == AMINS_WINDOW) {
|
||||||
w->tbl->close(w);
|
struct gui_window_2 *gwin = (struct gui_window_2 *)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;
|
|
||||||
ShowWindow(gwin->win, WINDOW_BACKMOST); // do we need this??
|
ShowWindow(gwin->win, WINDOW_BACKMOST); // do we need this??
|
||||||
w->tbl->close(w);
|
}
|
||||||
break;
|
w->tbl->close(w);
|
||||||
|
|
||||||
case AMINS_GUIOPTSWINDOW:
|
|
||||||
w->tbl->close(w);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case AMINS_DLWINDOW:
|
|
||||||
w->tbl->close(w);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} while((node = nnode));
|
} while((node = nnode));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user