diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index eff9d323e6..a37519962a 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -28,6 +28,10 @@ #include #endif +#ifdef __WXMAC__ +#include +#endif + //---------------------------------------------------------------------- #if PYTHON_API_VERSION <= 1007 && wxUSE_UNICODE @@ -1605,10 +1609,12 @@ PyObject* wxPy_ConvertList(wxListBase* list, const char* className) { //---------------------------------------------------------------------- long wxPyGetWinHandle(wxWindow* win) { + #ifdef __WXMSW__ return (long)win->GetHandle(); #endif + // Find and return the actual X-Window. #ifdef __WXGTK__ if (win->m_wxwindow) { @@ -1622,6 +1628,12 @@ long wxPyGetWinHandle(wxWindow* win) { #endif } #endif + + +#ifdef __WXMAC__ + return (long)MAC_WXHWND(win->MacGetRootWindow()); +#endif + return 0; }