]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
Missing header.
[wxWidgets.git] / src / gtk1 / window.cpp
index 90d84b4683b39edf0b870441961a2d9272697713..dbc991b9b21a00ef8195976cf49a809829ebfde7 100644 (file)
@@ -3982,9 +3982,7 @@ void wxWindowGTK::GtkSendPaintEvents()
     if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM))
     {
         // find ancestor from which to steal background
-        wxWindow *parent = IsTopLevel() ? this : GetParent();
-        while (parent && !parent->IsTopLevel())
-            parent = parent->GetParent();
+        wxWindow *parent = wxGetTopLevelParent((wxWindow *)this);
         if (!parent)
             parent = (wxWindow*)this;