diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 2ffbc1a024..558f67a699 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3971,7 +3971,7 @@ void wxWindowGTK::GtkSendPaintEvents() // widget to draw on GtkPizza *pizza = GTK_PIZZA (m_wxwindow); - if (GetThemeEnabled() && GetBackgroundStyle() == wxBG_STYLE_SYSTEM) + if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM) && !IsTopLevel()) { // find ancestor from which to steal background wxWindow *parent = GetParent(); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 2ffbc1a024..558f67a699 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -3971,7 +3971,7 @@ void wxWindowGTK::GtkSendPaintEvents() // widget to draw on GtkPizza *pizza = GTK_PIZZA (m_wxwindow); - if (GetThemeEnabled() && GetBackgroundStyle() == wxBG_STYLE_SYSTEM) + if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM) && !IsTopLevel()) { // find ancestor from which to steal background wxWindow *parent = GetParent();