X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7408cf7f7684c70fd86b6656452e9aab47c97be1..d94974609888885e0b75d0e01d901b03a6213979:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index ca83cf7c87..7339c08f07 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3605,6 +3605,18 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect ) if (g_isIdle) wxapp_install_idle_handler(); + wxRect myRect(0,0,0,0); + if (m_wxwindow && rect) + { + myRect.SetSize(wxSize( m_wxwindow->allocation.width, + m_wxwindow->allocation.height)); + myRect.Intersect(*rect); + if (!myRect.width || !myRect.height) + // nothing to do, rectangle is empty + return; + rect = &myRect; + } + if (eraseBackground && m_wxwindow && m_wxwindow->window) { if (rect)