adding a more extensive version to arrive at the impl when given a native control, taking into account eg the composited controls of a scrollview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -71,9 +71,22 @@ NSView* GetFocusedViewInWindow( NSWindow* keyWindow )
|
||||
|
||||
WXWidget wxWidgetImpl::FindFocus()
|
||||
{
|
||||
return GetFocusedViewInWindow( [NSApp keyWindow] );
|
||||
return GetFocusedViewInWindow( [NSApp keyWindow] );;
|
||||
}
|
||||
|
||||
wxWidgetImpl* wxWidgetImpl::FindBestFromWXWidget(WXWidget control)
|
||||
{
|
||||
wxWidgetImpl* impl = FindFromWXWidget(control);
|
||||
|
||||
// NSScrollViews can have their subviews like NSClipView
|
||||
// therefore check and use the NSScrollView peer in that case
|
||||
if ( impl == NULL && [[control superview] isKindOfClass:[NSScrollView class]])
|
||||
impl = FindFromWXWidget([control superview]);
|
||||
|
||||
return impl;
|
||||
}
|
||||
|
||||
|
||||
NSRect wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin )
|
||||
{
|
||||
int x, y, w, h ;
|
||||
|
||||
Reference in New Issue
Block a user