X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4e4ba484ddff22da8dc4ff767b42faf84b0fac1..7b7fd3e614c83315d77dc9df266784677f9dbca6:/src/osx/window_osx.cpp diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index bb4f4d691c..da9e32a5e1 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -200,10 +200,6 @@ WXWidget wxWindowMac::GetHandle() const return NULL; } -// -// TODO END move to window_osx.cpp -// - // --------------------------------------------------------------------------- // Utility Routines to move between different coordinate systems // --------------------------------------------------------------------------- @@ -1515,16 +1511,9 @@ void wxWindowMac::MacOnScroll( wxScrollEvent &event ) } } -// Get the window with the focus wxWindow *wxWindowBase::DoFindFocus() { -#if wxOSX_USE_CARBON - ControlRef control ; - GetKeyboardFocus( GetUserFocusWindow() , &control ) ; - return wxFindWindowFromWXWidget( (WXWidget) control ) ; -#else - return NULL; -#endif + return wxFindWindowFromWXWidget(wxWidgetImpl::FindFocus()); } void wxWindowMac::OnInternalIdle() @@ -2006,7 +1995,10 @@ void wxWindowMac::MacRepositionScrollBars() bool wxWindowMac::AcceptsFocus() const { - return m_peer->CanFocus() && wxWindowBase::AcceptsFocus(); + if ( MacIsUserPane() ) + return wxWindowBase::AcceptsFocus(); + else + return m_peer->CanFocus(); } void wxWindowMac::MacSuperChangedPosition() @@ -2158,7 +2150,7 @@ Rect wxMacGetBoundsForControl( wxWindowMac* window , const wxPoint& pos , const return bounds ; } -bool wxWindowMac::OSXHandleClicked( double timestampsec ) +bool wxWindowMac::OSXHandleClicked( double WXUNUSED(timestampsec) ) { return false; }