X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0430d964dca888a28eff26436e6360a7b79b65f..f155075229d771430f0793700f5048ad4be00e9d:/src/generic/splitter.cpp?ds=sidebyside diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 77b246750c..1db5638513 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -484,16 +484,15 @@ void wxSplitterWindow::SetSashGravity(double gravity) m_sashGravity = gravity; } -bool wxSplitterWindow::SashHitTest(int x, int y, int tolerance) +bool wxSplitterWindow::SashHitTest(int x, int y) { if ( m_windowTwo == NULL || m_sashPosition == 0) return false; // No sash int z = m_splitMode == wxSPLIT_VERTICAL ? x : y; - int hitMin = m_sashPosition - tolerance; - int hitMax = m_sashPosition + GetSashSize() + tolerance; + int hitMax = m_sashPosition + GetSashSize() - 1; - return z >= hitMin && z <= hitMax; + return z >= m_sashPosition && z <= hitMax; } void wxSplitterWindow::SetSashInvisible(bool invisible) @@ -1047,7 +1046,7 @@ void wxSplitterWindow::OnSetCursor(wxSetCursorEvent& event) // and like this we explicitly say that our cursor should not be used for // children windows which overlap us - if ( SashHitTest(event.GetX(), event.GetY(), 0) ) + if ( SashHitTest(event.GetX(), event.GetY()) ) { // default processing is ok event.Skip();