From 6549d4c3c5f5d3e3acc754a2b1dc04f4a0a336d1 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 15 Aug 2019 17:14:31 -0700 Subject: [PATCH] Fix wxDC::Clear() with transparent brush on GTK2 See #10273 --- src/gtk/dcclient.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index feea364099..dc3331cc3e 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1508,6 +1508,9 @@ void wxWindowDCImpl::Clear() if (!m_gdkwindow) return; + if (!m_backgroundBrush.IsOk() || m_backgroundBrush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT) + return; + int width,height; DoGetSize( &width, &height ); gdk_draw_rectangle( m_gdkwindow, m_bgGC, TRUE, 0, 0, width, height );