Fix clipping which resulted in not showing wxGrid editor in wxOSX

Fix clipping for the windows not showing scrollbars.

This commit is best viewed ignoring whitespace-only changes.

Closes #24201.

Closes #24342.
This commit is contained in:
Stefan Csomor 2024-02-21 20:12:13 +01:00 committed by Vadim Zeitlin
parent 5ca49dc56c
commit 6e7bbfd17c
2 changed files with 46 additions and 39 deletions

View file

@ -4079,6 +4079,11 @@ void wxWidgetCocoaImpl::AdjustClippingView(wxScrollBar* horizontal, wxScrollBar*
void wxWidgetCocoaImpl::UseClippingView()
{
// starting from Sonoma child windows are bleeding through under the scrollbar
// use native scrollviews therefore
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_14_0
if ( WX_IS_MACOS_AVAILABLE(14, 0) )
{
wxWindow* peer = m_wxPeer;
if ( peer && m_osxClipView == nil)
@ -4089,6 +4094,8 @@ void wxWidgetCocoaImpl::UseClippingView()
// TODO check for additional subwindows which might have to be moved to the clip view ?
}
}
#endif
}

View file

@ -2112,9 +2112,8 @@ bool wxWindowMac::MacIsChildOfClientArea( const wxWindow* child ) const
void wxWindowMac::MacRepositionScrollBars()
{
#if wxUSE_SCROLLBAR
if ( !m_hScrollBar && !m_vScrollBar )
return ;
if ( m_hScrollBar || m_vScrollBar )
{
int scrlsize = m_hScrollBar ? m_hScrollBar->GetSize().y : ( m_vScrollBar ? m_vScrollBar->GetSize().x : MAC_SCROLLBAR_SIZE ) ;
int adjust = MacHasScrollBarCorner() ? scrlsize - 1 : 0 ;
@ -2148,6 +2147,7 @@ void wxWindowMac::MacRepositionScrollBars()
m_growBox->Hide();
}
}
}
m_peer->AdjustClippingView(m_hScrollBar, m_vScrollBar);
#endif
}