Commit 3da9acb3 authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

don't unref our accessible peer; it may be accessed while we're

* src/vte.c(vte_terminal_unrealize): don't unref our accessible peer; it may be
	accessed while we're unrealized, causing it to be destroyed and
	re-created needlessly (#128049).
* src/vte.c(vte_terminal_finalize): unref our accessible peer.
parent e0f3c599
2004-04-29 nalin
* src/vte.c(vte_terminal_unrealize): don't unref our accessible peer;
it may be accessed while we're unrealized, causing it to be destroyed
and re-created needlessly (#128049).
* src/vte.c(vte_terminal_finalize): unref our accessible peer.
2004-04-29 nalin
* src/vte.c(vte_terminal_finalize): don't clear the child's PID early,
so that we'll SIGHUP it properly (the kernel should do that anyway,
......
......@@ -11448,7 +11448,7 @@ vte_terminal_init(VteTerminal *terminal, gpointer *klass)
pvt->accessible_emit = FALSE;
#ifdef VTE_DEBUG
/* In debuggable mode, we always used to do this. */
/* In debuggable mode, we always do this. */
/* gtk_widget_get_accessible(GTK_WIDGET(terminal)); */
#endif
}
......@@ -11636,21 +11636,6 @@ vte_terminal_unrealize(GtkWidget *widget)
root_pixmap_changed_cb,
widget);
/* Shut down accessibility. */
if (terminal->pvt->accessible != NULL) {
g_object_remove_weak_pointer(G_OBJECT(terminal->pvt->accessible),
&terminal->pvt->accessible);
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) {
fprintf(stderr, "Accessible peer has refcount %d "
"before we unref it.\n",
(G_OBJECT(terminal->pvt->accessible))->ref_count);
}
#endif
g_object_unref(G_OBJECT(terminal->pvt->accessible));
terminal->pvt->accessible = NULL;
}
/* Deallocate the cursors. */
terminal->pvt->mouse_cursor_visible = FALSE;
gdk_cursor_unref(terminal->pvt->mouse_default_cursor);
......@@ -11933,6 +11918,21 @@ vte_terminal_finalize(GObject *object)
_vte_termcap_free(terminal->pvt->termcap);
terminal->pvt->termcap = NULL;
/* Shut down accessibility. */
if (terminal->pvt->accessible != NULL) {
g_object_remove_weak_pointer(G_OBJECT(terminal->pvt->accessible),
&terminal->pvt->accessible);
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) {
fprintf(stderr, "Accessible peer has refcount %d "
"before we unref it.\n",
(G_OBJECT(terminal->pvt->accessible))->ref_count);
}
#endif
g_object_unref(G_OBJECT(terminal->pvt->accessible));
terminal->pvt->accessible = NULL;
}
/* Done with our private data. */
g_free(terminal->pvt);
terminal->pvt = NULL;
......
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