X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9dc44eff0235c5f30940f32ccc6d9d82a236e7d2..a672d82a64965edcef6260c6fefffb94f76dd096:/src/gtk/nativewin.cpp diff --git a/src/gtk/nativewin.cpp b/src/gtk/nativewin.cpp index 99ded721f8..c40ed6d0d5 100644 --- a/src/gtk/nativewin.cpp +++ b/src/gtk/nativewin.cpp @@ -3,7 +3,6 @@ // Purpose: wxNativeWindow implementation // Author: Vadim Zeitlin // Created: 2008-03-05 -// RCS-ID: $Id$ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -96,7 +95,11 @@ bool wxNativeContainerWindow::Create(wxNativeContainerWindowId anid) { bool rc; #ifdef __WXGTK3__ +#ifdef GDK_WINDOWING_X11 GdkWindow * const win = gdk_x11_window_foreign_new_for_display(gdk_display_get_default(), anid); +#else + GdkWindow * const win = NULL; +#endif #else GdkWindow * const win = gdk_window_foreign_new(anid); #endif @@ -121,6 +124,7 @@ void wxNativeContainerWindow::OnNativeDestroyed() // 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