Ensure that when a gui_window dies in nsgtk it kills its browser and gets that to kill it. Makes the browser less crashy if one closes an in-flight window

svn path=/trunk/netsurf/; revision=3355
This commit is contained in:
Daniel Silverstone 2007-06-20 19:43:09 +00:00
parent fa9d7facf5
commit 5e0e967a79
3 changed files with 7 additions and 1 deletions

View File

@ -193,7 +193,7 @@ void nsgtk_window_destroy_event(GtkWidget *widget, gpointer data)
if (!g->being_destroyed) {
g->being_destroyed = 1;
gui_window_destroy(g->top_level);
nsgtk_window_destroy_browser(g->top_level);
}
}

View File

@ -531,6 +531,11 @@ void nsgtk_reflow_all_windows(void)
}
}
void nsgtk_window_destroy_browser(struct gui_window *g)
{
browser_window_destroy(g->bw);
}
void gui_window_destroy(struct gui_window *g)
{
if (g->prev)

View File

@ -19,5 +19,6 @@ struct browser_window *nsgtk_get_browser_for_gui(struct gui_window *g);
float nsgtk_get_scale_for_gui(struct gui_window *g);
int nsgtk_gui_window_update_targets(struct gui_window *g);
void nsgtk_window_destroy_browser(struct gui_window *g);
#endif /* NETSURF_GTK_WINDOW_H */