From cd5e74bad9646702d8b11bb2edbc3f3fa02c534a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 28 Feb 2005 01:06:48 +0000 Subject: [PATCH] wxUniv compilation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 4 +--- src/gtk1/window.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 90d84b4683..dbc991b9b2 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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; diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 90d84b4683..dbc991b9b2 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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; -- 2.45.2