Implement wxFindWindowAtPoint() correctly for wxOSX/Carbon.

Use Carbon FindWindow() function instead of the generic wx version which
doesn't take the relative windows Z-order into account correctly.

Closes #11412.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-11-05 14:59:14 +00:00
parent 32e806fe7f
commit 2b76dfb048

View 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
}
/*