Skip to content

Commit f33b79e

Browse files
committed
[Gtk4] Paint before child snapshot in Display snapshotDrawProc
Fixes JFace Forms rendering.
1 parent c5244c1 commit f33b79e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,14 +1720,15 @@ void snapshotDrawProc(long handle, long snapshot) {
17201720
// Draw background before children so it appears behind them
17211721
if (widget != null) widget.snapshotBackground(handle, snapshot);
17221722

1723+
// Draw SWT custom paint before children so child widgets remain visible.
1724+
if (widget != null) widget.snapshotToDraw(handle, snapshot);
1725+
17231726
long child = GTK4.gtk_widget_get_first_child(handle);
1724-
// Propagate the snapshot down the widget tree first
1727+
// Propagate the snapshot down the widget tree.
17251728
while (child != 0) {
17261729
GTK4.gtk_widget_snapshot_child(handle, child, snapshot);
17271730
child = GTK4.gtk_widget_get_next_sibling(child);
17281731
}
1729-
// Draw custom paint on top of children
1730-
if (widget != null) widget.snapshotToDraw(handle, snapshot);
17311732
}
17321733

17331734
static long rendererGetPreferredWidthProc (long cell, long handle, long minimun_size, long natural_size) {

0 commit comments

Comments
 (0)