Applied patch 1283609 GTK window dtor + wxGrid + cellEditor ==> crash
David Surovell, OSAF git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
19c46ab5f3
commit
02c3e53b45
@ -2883,11 +2883,22 @@ wxWindowGTK::~wxWindowGTK()
|
|||||||
m_isBeingDeleted = true;
|
m_isBeingDeleted = true;
|
||||||
m_hasVMT = false;
|
m_hasVMT = false;
|
||||||
|
|
||||||
|
// destroy children before destroying this window itself
|
||||||
|
DestroyChildren();
|
||||||
|
|
||||||
|
// unhook focus handlers to prevent stray events being
|
||||||
|
// propagated to this (soon to be) dead object
|
||||||
|
if (m_focusWidget != NULL)
|
||||||
|
{
|
||||||
|
gtk_signal_disconnect_by_func( GTK_OBJECT(m_focusWidget),
|
||||||
|
(GtkSignalFunc) gtk_window_focus_in_callback, (gpointer) this );
|
||||||
|
gtk_signal_disconnect_by_func( GTK_OBJECT(m_focusWidget),
|
||||||
|
(GtkSignalFunc) gtk_window_focus_out_callback, (gpointer) this );
|
||||||
|
}
|
||||||
|
|
||||||
if (m_widget)
|
if (m_widget)
|
||||||
Show( false );
|
Show( false );
|
||||||
|
|
||||||
DestroyChildren();
|
|
||||||
|
|
||||||
#ifdef HAVE_XIM
|
#ifdef HAVE_XIM
|
||||||
if (m_ic)
|
if (m_ic)
|
||||||
gdk_ic_destroy (m_ic);
|
gdk_ic_destroy (m_ic);
|
||||||
|
@ -2883,11 +2883,22 @@ wxWindowGTK::~wxWindowGTK()
|
|||||||
m_isBeingDeleted = true;
|
m_isBeingDeleted = true;
|
||||||
m_hasVMT = false;
|
m_hasVMT = false;
|
||||||
|
|
||||||
|
// destroy children before destroying this window itself
|
||||||
|
DestroyChildren();
|
||||||
|
|
||||||
|
// unhook focus handlers to prevent stray events being
|
||||||
|
// propagated to this (soon to be) dead object
|
||||||
|
if (m_focusWidget != NULL)
|
||||||
|
{
|
||||||
|
gtk_signal_disconnect_by_func( GTK_OBJECT(m_focusWidget),
|
||||||
|
(GtkSignalFunc) gtk_window_focus_in_callback, (gpointer) this );
|
||||||
|
gtk_signal_disconnect_by_func( GTK_OBJECT(m_focusWidget),
|
||||||
|
(GtkSignalFunc) gtk_window_focus_out_callback, (gpointer) this );
|
||||||
|
}
|
||||||
|
|
||||||
if (m_widget)
|
if (m_widget)
|
||||||
Show( false );
|
Show( false );
|
||||||
|
|
||||||
DestroyChildren();
|
|
||||||
|
|
||||||
#ifdef HAVE_XIM
|
#ifdef HAVE_XIM
|
||||||
if (m_ic)
|
if (m_ic)
|
||||||
gdk_ic_destroy (m_ic);
|
gdk_ic_destroy (m_ic);
|
||||||
|
Loading…
Reference in New Issue
Block a user