Skip to content

Commit 2251803

Browse files
committed
[GTK] Fix Gtk4 test crash in Control.setRegion
GTK4 doesn't have such api anymore and it would have to be handled at the rendering layer as per https://gitlab.gnome.org/GNOME/gtk/-/commit/0ce19eed083c79c5fb4091db3ecaf528346e610f .
1 parent 50b9fa1 commit 2251803

File tree

1 file changed

+5
-0
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,11 @@ public void setRegion (Region region) {
13941394
long topHandle = topHandle ();
13951395

13961396
if (OS.G_OBJECT_TYPE(topHandle) == GTK.GTK_TYPE_WINDOW()) {
1397+
if (GTK.GTK4) {
1398+
//TODO gtk_widget_shape_combine_region is removed and one has to hook at the rendering layer as per
1399+
// https://gitlab.gnome.org/GNOME/gtk/-/commit/0ce19eed083c79c5fb4091db3ecaf528346e610f
1400+
return;
1401+
}
13971402
GTK3.gtk_widget_shape_combine_region(topHandle, shape_region);
13981403
/*
13991404
* Bug in GTK: on Wayland, pixels in window outside shape_region

0 commit comments

Comments
 (0)