From 1c97259a919361a4b2d46f0a6bfb23d48f94ce70 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 30 Sep 2004 01:17:18 +0000 Subject: [PATCH] A better fix for GetXWindow that can handle both the wx widgets and the native widgets. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/helpers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index a17498e304..b8abb1edec 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -28,7 +28,9 @@ #include #include #include -#define GetXWindow(wxwin) GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) +#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \ + GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \ + GDK_WINDOW_XWINDOW((wxwin)->m_widget->window) #include #endif