Commit 73a26e0a authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

create the terminal's draw structure. free the terminal's draw structure.

* src/vte.c(vte_terminal_realize): create the terminal's draw structure.
* src/vte.c(vte_terminal_unrealize): free the terminal's draw structure.
* src/vteapp.c(main): enforce a clean shutdown by requiring that the terminal
	and top-level window are both finalized before gtk_main() returns.
parent cb5bbefe
2003-05-20 nalin
* src/vte.c(vte_terminal_realize): create the terminal's draw structure.
* src/vte.c(vte_terminal_unrealize): free the terminal's draw structure.
* src/vteapp.c(main): enforce a clean shutdown by requiring that the
terminal and top-level window are both finalized before gtk_main()
returns.
2003-05-20 nalin
* src/vte.c(vte_terminal_finalize): properly send a SIGHUP to the child
process if it hasn't already exited (#112505).
......
......@@ -10944,6 +10944,12 @@ vte_terminal_unrealize(GtkWidget *widget)
g_return_if_fail(VTE_IS_TERMINAL(widget));
terminal = VTE_TERMINAL(widget);
/* Clean up our draw structure. */
if (terminal->pvt->draw != NULL) {
_vte_draw_free(terminal->pvt->draw);
}
terminal->pvt->draw = NULL;
/* Disconnect from background-change events. */
g_signal_handlers_disconnect_by_func(G_OBJECT(vte_bg_get()),
root_pixmap_changed_cb,
......@@ -11043,6 +11049,12 @@ vte_terminal_finalize(GObject *object)
object_class = G_OBJECT_GET_CLASS(G_OBJECT(object));
widget_class = g_type_class_peek(GTK_TYPE_WIDGET);
/* Free the draw structure. */
if (terminal->pvt->draw != NULL) {
_vte_draw_free(terminal->pvt->draw);
}
terminal->pvt->draw = NULL;
/* The NLS maps. */
if (terminal->pvt->iso2022 != NULL) {
_vte_iso2022_state_free(terminal->pvt->iso2022);
......@@ -11063,10 +11075,6 @@ vte_terminal_finalize(GObject *object)
}
vte_terminal_disconnect_xft_settings(terminal);
/* Clean up our draw structure. */
_vte_draw_free(terminal->pvt->draw);
terminal->pvt->draw = NULL;
/* Free matching data. */
if (terminal->pvt->match_attributes != NULL) {
g_array_free(terminal->pvt->match_attributes, TRUE);
......@@ -11283,6 +11291,12 @@ vte_terminal_realize(GtkWidget *widget)
g_return_if_fail(VTE_IS_TERMINAL(widget));
terminal = VTE_TERMINAL(widget);
/* Create the draw structure if we don't already have one. */
if (terminal->pvt->draw != NULL) {
_vte_draw_free(terminal->pvt->draw);
}
terminal->pvt->draw = _vte_draw_new(GTK_WIDGET(terminal));
/* Create the stock cursors. */
terminal->pvt->mouse_cursor_visible = TRUE;
terminal->pvt->mouse_default_cursor =
......
......@@ -669,9 +669,14 @@ main(int argc, char **argv)
}
/* Go for it! */
g_object_add_weak_pointer(G_OBJECT(widget), (gpointer*)&widget);
g_object_add_weak_pointer(G_OBJECT(window), (gpointer*)&window);
gtk_widget_show_all(window);
gtk_main();
g_assert(widget == NULL);
g_assert(window == NULL);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment