Skip to content

Commit df1c412

Browse files
ptzieglerakurtakov
authored andcommitted
[GTK4] Stop handling expose events directly
The handling of expose events has been internalized with GTK4 making it impossible to e.g. invalidate an area of a surface. Furthermore, the native method that are called no longer exist in GTK4, leading to an UnsatisfiedLinkError. From the documentation: Application and widget code should not handle expose events directly; invalidation should use the GtkWidget API, and drawing should only happen inside GtkWidget::draw implementations. Closes #1794
1 parent 0a14879 commit df1c412

File tree

1 file changed

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

1 file changed

+3
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,9 @@ static void checkDisplay (Thread thread, boolean multiple) {
10151015
}
10161016

10171017
long checkIfEventProc (long display, long xEvent, long userData) {
1018+
if (GTK.GTK4) {
1019+
return 0;
1020+
}
10181021
int type = OS.X_EVENT_TYPE (xEvent);
10191022
switch (type) {
10201023
case OS.Expose:

0 commit comments

Comments
 (0)