#include "wx/gtk/private/gtk2-compat.h"
#ifdef GDK_WINDOWING_X11
- #include <X11/Xlib.h>
+ #include <gdk/gdkx.h>
#endif
// ============================================================================
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
if ( win )
{
rc = Create(win);