aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Thondapu2014-03-03 10:04:27 (EST)
committerArun Thondapu2014-03-03 12:16:48 (EST)
commit48cc91881fabe6090deaff9e4998f89134ee1fcc (patch)
treeca88bc95cee1aca14c52625b69cf2c8c8a7c7a50
parent834c789aaeedc86f335716800ec1bf8818b13bb4 (diff)
downloadrt.equinox.framework-48cc91881fabe6090deaff9e4998f89134ee1fcc.zip
rt.equinox.framework-48cc91881fabe6090deaff9e4998f89134ee1fcc.tar.gz
rt.equinox.framework-48cc91881fabe6090deaff9e4998f89134ee1fcc.tar.bz2
Bug 421127 - All views empty with GTK 3.10refs/changes/77/22777/3
Fall back to GTK+ 2 for GTK+ 3 versions > 3.9.0 till we have a proper fix for the bug in place so that Eclipse is usable Change-Id: I1a35bb3963e404d4a4c45e16d254aca3ae762a7d Signed-off-by: Arun Thondapu <arunkumar.thondapu@in.ibm.com>
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
index 996c9ef..6a5d5e2 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
@@ -106,6 +106,20 @@ int loadGtk() {
if (gtk3 == NULL || strcmp(gtk3,"1") == 0) {
gdkLib = dlopen(GDK3_LIB, DLFLAGS);
gtkLib = dlopen(GTK3_LIB, DLFLAGS);
+ if (gtkLib != NULL) {
+ const char * (*func)(int, int, int);
+ dlerror();
+ *(void**) (&func) = dlsym(gtkLib, "gtk_check_version");
+ if (dlerror() == NULL && func) {
+ const char *check = (*func)(3, 9, 0);
+ if (check == NULL) {
+ dlclose(gdkLib);
+ dlclose(gtkLib);
+ gdkLib = gtkLib = NULL;
+ setenv("SWT_GTK3","0",1);
+ }
+ }
+ }
}
if (!gtkLib || !gdkLib) {
gdkLib = dlopen(GDK_LIB, DLFLAGS);