Don't use gdk_window_set_composited() on toplevel windows

Or try to paint their contents onto a parent toplevel. From the GDK doc:
"It only makes sense for child windows to be composited".
See #18592
This commit is contained in:
Paul Cornett
2021-12-30 11:49:04 -08:00
parent 654c51f085
commit 21c3f10e28

View File

@@ -2353,7 +2353,7 @@ void wxWindowGTK::GTKHandleRealized()
if (IsTransparentBackgroundSupported())
{
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
if (window)
if (window && !IsTopLevel())
gdk_window_set_composited(window, true);
wxGCC_WARNING_RESTORE()
}
@@ -5339,7 +5339,8 @@ void wxWindowGTK::GTKSendPaintEvents(const GdkRegion* region)
for ( node = m_children.GetFirst(); node ; node = node->GetNext() )
{
wxWindow *compositeChild = node->GetData();
if (compositeChild->GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT)
if (compositeChild->GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT &&
!compositeChild->IsTopLevel())
{
#ifndef __WXGTK3__
if (cr == NULL)