X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b965a9cfbf43c70d133ff268e70f393d8679637..f43a6e5ca92ffd68dbfc70e88e5c204a407d55b5:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index f828018064..a55d32a3ad 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -3977,10 +3977,10 @@ void wxWindowGTK::GtkSendPaintEvents() // widget to draw on GtkPizza *pizza = GTK_PIZZA (m_wxwindow); - if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM) && !IsTopLevel()) + 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)