]> git.saurik.com Git - wxWidgets.git/commitdiff
A better fix for GetXWindow that can handle both the wx widgets and
authorRobin Dunn <robin@alldunn.com>
Thu, 30 Sep 2004 01:17:18 +0000 (01:17 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 30 Sep 2004 01:17:18 +0000 (01:17 +0000)
the native widgets.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/helpers.cpp

index a17498e3045f09e9dcbae400381cfc6817d4a8cf..b8abb1edec832956fd70fc9d9e4e2f676409180d 100644 (file)
@@ -28,7 +28,9 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkprivate.h>
 #include <wx/gtk/win_gtk.h>
-#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 <locale.h>
 #endif