X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c5e6fc68ee3766c90613e6d3cc88aab062c235e..245f35816d761212279e8cf223475efb7a367553:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index af1bddc332..7339c08f07 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -1420,7 +1420,7 @@ wxWindowGTK *FindWindowForMouseEvent(wxWindowGTK *win, wxCoord& x, wxCoord& y) int xx1 = child->m_x; int yy1 = child->m_y; int xx2 = child->m_x + child->m_width; - int yy2 = child->m_x + child->m_height; + int yy2 = child->m_y + child->m_height; // left if (((xx >= xx1) && (xx <= xx1+10) && (yy >= yy1) && (yy <= yy2)) || @@ -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)