]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/utils_osx.cpp
Fix another line somehow missing from the wxGraphicsBitmap forward port.
[wxWidgets.git] / src / osx / utils_osx.cpp
index 8a612a66dafe954942253f27918e4db7a3c08a11..20d791b1a7373967f6af31d6d7f1c1f2873d062d 100644 (file)
@@ -154,9 +154,31 @@ wxEventLoopBase* wxGUIAppTraits::CreateEventLoop()
     return new wxEventLoop;
 }
 
+wxNonOwnedWindow *wxFindWindowFromWXWindow(WXWindow inWindowRef);
+wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt);
+
 wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
 {
-    return wxGenericFindWindowAtPoint(pt);
+#if wxOSX_USE_CARBON
+
+    Point screenPoint = { pt.y , pt.x };
+    WindowRef windowRef;
+
+    if ( FindWindow( screenPoint , &windowRef ) )
+    {
+        wxNonOwnedWindow *nonOwned = wxFindWindowFromWXWindow( windowRef );
+
+        if ( nonOwned )
+            return wxFindWindowAtPoint( nonOwned , pt );
+    }
+
+    return NULL;
+
+#else
+
+    return wxGenericFindWindowAtPoint( pt );
+
+#endif
 }
 
 /*