]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
Updated FAQs from web site
[wxWidgets.git] / src / gtk1 / window.cpp
index f828018064629816014d3252f9b9d6ac6bcfc345..a55d32a3ad1cecaf558d0d4a0b14b472088ba483 100644 (file)
@@ -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)