From aac97549ab6be4d2a4bf49a1a7c781d648304eff Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 21 Feb 2005 11:41:59 +0000 Subject: [PATCH] Don't inherit background from parent if we're top-level git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 4 ++-- src/gtk1/window.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index f828018064..a55d32a3ad 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/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) 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) -- 2.47.2