X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0ed460c2e7802793d591c84f3cfdbff159c5549..7921cf2badfac0c44cd53644bfc6a483a09ec299:/src/generic/sashwin.cpp diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index 9bac85b92d..2553c9f700 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -96,10 +96,8 @@ void wxSashWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); -#if 0 - if ( m_borderSize > 0 ) - DrawBorders(dc); -#endif + // if ( m_borderSize > 0 ) + DrawBorders(dc); DrawSashes(dc); } @@ -115,13 +113,21 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event) { if ( sashHit != wxSASH_NONE ) { - CaptureMouse(); + CaptureMouse(); // Required for X to specify that - // that we wish to draw on top of all windows - // - and we optimise by specifying the area - // for creating the overlap window. - wxScreenDC::StartDrawingOnTop(this); + // that we wish to draw on top of all windows + // - and we optimise by specifying the area + // for creating the overlap window. + // Find the first frame or dialog and use this to specify + // the area to draw on. + wxWindow* parent = this; + + while (parent && !parent->IsKindOf(CLASSINFO(wxDialog)) && + !parent->IsKindOf(CLASSINFO(wxFrame))) + parent = parent->GetParent(); + + wxScreenDC::StartDrawingOnTop(parent); // We don't say we're dragging yet; we leave that // decision for the Dragging() branch, to ensure