]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/nativewin.cpp
Fix deprecating warning introduced in r72446.
[wxWidgets.git] / src / gtk / nativewin.cpp
index 4ed6675a70ffafe331c8d14f7c55463b07580931..d95d98094d9d49a4c719114ac3d328866649c44d 100644 (file)
@@ -32,7 +32,7 @@
 #include "wx/gtk/private/gtk2-compat.h"
 
 #ifdef GDK_WINDOWING_X11
 #include "wx/gtk/private/gtk2-compat.h"
 
 #ifdef GDK_WINDOWING_X11
-    #include <X11/Xlib.h>
+    #include <gdk/gdkx.h>
 #endif
 
 // ============================================================================
 #endif
 
 // ============================================================================
@@ -95,7 +95,15 @@ bool wxNativeContainerWindow::Create(wxNativeContainerWindowHandle win)
 bool wxNativeContainerWindow::Create(wxNativeContainerWindowId anid)
 {
     bool rc;
 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);
     GdkWindow * const win = gdk_window_foreign_new(anid);
+#endif
     if ( win )
     {
         rc = Create(win);
     if ( win )
     {
         rc = Create(win);