+void wxNativeContainerWindow::OnNativeDestroyed()
+{
+ // unfortunately we simply can't do anything else than leak memory here:
+ // we really need to call _gdk_window_destroy(m_widget->win, TRUE) to
+ // indicate that the native window was deleted, but we can't do this
+ // because it's a private GDK function and calling normal
+ // gdk_window_destroy() results in X errors while nulling just the window
+ // pointer and destroying m_widget results in many GTK errors
+ GTKDisconnect(m_widget);
+ m_widget = NULL;
+
+ // notice that we intentionally don't use Close() nor Delete() here as our
+ // window (and the windows of all of our children) is invalid any more and
+ // any attempts to use it, as may happen with the delayed destruction, will
+ // result in GDK warnings at best and crashes or X errors at worst
+ delete this;
+}
+