X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/024e9a4cea08387daf5c2027cdc7e098eb563503..68654a8295dfa285e712f7bbd9607a703c245969:/src/gtk/window.cpp?ds=sidebyside diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 2ffbc1a024..a55d32a3ad 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3941,6 +3941,12 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect ) void wxWindowGTK::Update() { GtkUpdate(); + + // when we call Update() we really want to update the window immediately on + // screen, even if itmeans flushing the entire queue and hence slowing down + // everything -- but it should still be done, it's just that Update() should + // be called very rarely + gdk_flush(); } void wxWindowGTK::GtkUpdate() @@ -3971,10 +3977,10 @@ void wxWindowGTK::GtkSendPaintEvents() // widget to draw on GtkPizza *pizza = GTK_PIZZA (m_wxwindow); - if (GetThemeEnabled() && GetBackgroundStyle() == wxBG_STYLE_SYSTEM) + if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM)) { // find ancestor from which to steal background - wxWindow *parent = GetParent(); + wxWindow *parent = IsTopLevel() ? this : GetParent(); while (parent && !parent->IsTopLevel()) parent = parent->GetParent(); if (!parent)