David Surovell, OSAF
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35554
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
m_isBeingDeleted = true;
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)
Show( false );
- DestroyChildren();
-
#ifdef HAVE_XIM
if (m_ic)
gdk_ic_destroy (m_ic);
m_isBeingDeleted = true;
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)
Show( false );
- DestroyChildren();
-
#ifdef HAVE_XIM
if (m_ic)
gdk_ic_destroy (m_ic);