mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
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:
parent
fa9d7facf5
commit
5e0e967a79
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user