From 16c22719755f5a6b4ae0556a6a2360a778706285 Mon Sep 17 00:00:00 2001 From: Aleksandar Kurtakov Date: Wed, 9 Jul 2025 15:32:36 +0300 Subject: [PATCH] [GTK] Do not render background if backgroundImage is set Fixes https://github.com/eclipse-platform/eclipse.platform.swt/issues/2290 --- .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java index 6a64f0b58e0..62ff8929e0e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java @@ -499,7 +499,9 @@ long gtk_draw (long widget, long cairo) { int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height; // We specify a 0 value for x & y as we want the whole widget to be // colored, not some portion of it. - GTK.gtk_render_background(context, cairo, 0, 0, width, height); + if (backgroundImage == null) { + GTK.gtk_render_background(context, cairo, 0, 0, width, height); + } // If fixClipHandle is set: iterate through the children of widget // and set their clips to be that of their allocation if (widget == fixClipHandle) fixClippings();