Skip to content

Commit 9bf5a53

Browse files
committed
[GTK] Do not render background if backgroundImage is set
Fixes #2290
1 parent ee60a45 commit 9bf5a53

File tree

1 file changed

+3
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets

1 file changed

+3
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ long gtk_draw (long widget, long cairo) {
499499
int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
500500
// We specify a 0 value for x & y as we want the whole widget to be
501501
// colored, not some portion of it.
502-
GTK.gtk_render_background(context, cairo, 0, 0, width, height);
502+
if (backgroundImage == null) {
503+
GTK.gtk_render_background(context, cairo, 0, 0, width, height);
504+
}
503505
// If fixClipHandle is set: iterate through the children of widget
504506
// and set their clips to be that of their allocation
505507
if (widget == fixClipHandle) fixClippings();

0 commit comments

Comments
 (0)