diff options
author | Eric Williams | 2018-11-23 21:05:22 +0000 |
---|---|---|
committer | Eric Williams | 2018-11-23 21:05:22 +0000 |
commit | 25058cf0971f12557499ec26da102299f56cecb5 (patch) | |
tree | f6dfc3df9ea6510cacade940955487be836ffbea | |
parent | 3f85ae3f2802cdd9d99296643a26231355709211 (diff) | |
download | eclipse.platform.swt-25058cf0971f12557499ec26da102299f56cecb5.tar.gz eclipse.platform.swt-25058cf0971f12557499ec26da102299f56cecb5.tar.xz eclipse.platform.swt-25058cf0971f12557499ec26da102299f56cecb5.zip |
Bug 541107: [GTK4] Port native SwtFixed code to GTK4
Disable swt_fatal_warnings on GTK4 as it relies on gtk_parse_args()
which does not exist on GTK4.
Change-Id: I0f3027ea60221242f7b2d5c97e666f48de8952d2
Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c | 5 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c index 3a21418266..81234d54b0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c @@ -2284,8 +2284,10 @@ jintLong call_accessible_object_function (const char *method_name, const char *m return result; } +#if !defined(GTK4) //Add ability to debug gtk warnings for SWT snippets via SWT_FATAL_WARNINGS=1 -// env variable. Please see Eclipse bug 471477 +// env variable. Please see Eclipse bug 471477. +// PLEASE NOTE: this functionality is only available on GTK3. void swt_debug_on_fatal_warnings() { // NOTE: gtk_parse_args() must be called before gtk_init() to take effect. int argcount = 2; @@ -2293,3 +2295,4 @@ void swt_debug_on_fatal_warnings() { char **arg2 = (char **) &argument; gtk_parse_args(&argcount, &arg2); } +#endif diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java index 8f798afe94..8938b2b413 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java @@ -98,7 +98,13 @@ public class OS extends C { String swt_fatal_warnings = getEnvironmentalVariable (propertyName); if (swt_fatal_warnings != null && swt_fatal_warnings.equals("1")) { - OS.swt_debug_on_fatal_warnings (); + String gtk4PropertyName = "SWT_GTK4"; + String gtk4 = getEnvironmentalVariable (gtk4PropertyName); + if (gtk4 != null && gtk4.equals("1")) { + System.err.println("SWT warning: SWT_FATAL_WARNINGS only available on GTK3."); + } else { + OS.swt_debug_on_fatal_warnings (); + } } } |