From bb78b682be2374a6910e4f8f53d0b2954353b95c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 13 Sep 2006 11:01:10 +0000 Subject: [PATCH] wxTLW::DoRefreshRect must check the rect, too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/dfb/toplevel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dfb/toplevel.cpp b/src/dfb/toplevel.cpp index 3aebd23e40..b607ecc863 100644 --- a/src/dfb/toplevel.cpp +++ b/src/dfb/toplevel.cpp @@ -441,7 +441,11 @@ void wxTopLevelWindowDFB::HandleQueuedPaintRequests() void wxTopLevelWindowDFB::DoRefreshRect(const wxRect& rect) { - wxASSERT_MSG( rect.width > 0 && rect.height > 0, _T("invalid rect") ); + // don't overlap outside of the window (NB: 'rect' is in window coords): + wxRect r(rect); + r.Intersect(wxRect(GetSize())); + if ( r.IsEmpty() ) + return; wxLogTrace(TRACE_PAINT, _T("%p ('%s'): [TLW] refresh rect [%i,%i,%i,%i]"), -- 2.50.0