X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4e4ba484ddff22da8dc4ff767b42faf84b0fac1..d58526d55433162cef8ad2ed7f422689862c3019:/src/osx/window_osx.cpp diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index bb4f4d691c..fb1040f88d 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 // --------------------------------------------------------------------------- @@ -799,6 +795,8 @@ void wxWindowMac::DoMoveWindow(int x, int y, int width, int height) int actualX = x; int actualY = y; +#if 0 + // min and max sizes are only for sizers, not for explicit size setting if ((m_minWidth != -1) && (actualWidth < m_minWidth)) actualWidth = m_minWidth; if ((m_minHeight != -1) && (actualHeight < m_minHeight)) @@ -807,6 +805,7 @@ void wxWindowMac::DoMoveWindow(int x, int y, int width, int height) actualWidth = m_maxWidth; if ((m_maxHeight != -1) && (actualHeight > m_maxHeight)) actualHeight = m_maxHeight; +#endif bool doMove = false, doResize = false ; @@ -1515,16 +1514,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 +1998,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 +2153,7 @@ Rect wxMacGetBoundsForControl( wxWindowMac* window , const wxPoint& pos , const return bounds ; } -bool wxWindowMac::OSXHandleClicked( double timestampsec ) +bool wxWindowMac::OSXHandleClicked( double WXUNUSED(timestampsec) ) { return false; }