aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2018-05-18 04:19:00 -0400
committerAndrey Loskutov2018-05-18 04:19:00 -0400
commita93dfd8eb2abccb354cd0e3c451a70e1f13c393f (patch)
treecfbc37c788365775480a4da8a53de6c66d8daad8
parent0f09431e66e867587d47cab4e89f031fcde1b320 (diff)
downloadrt.equinox.framework-a93dfd8eb2abccb354cd0e3c451a70e1f13c393f.zip
rt.equinox.framework-a93dfd8eb2abccb354cd0e3c451a70e1f13c393f.tar.gz
rt.equinox.framework-a93dfd8eb2abccb354cd0e3c451a70e1f13c393f.tar.xz
Bug 534759 - [GTK3] Running Eclipse with -nosplash causes input problems
Move GTK environment variables initialization to make sure they are always set for the Eclipse JVM started on GTK systems, independently of possible startup arguments like "-nosplash". Change-Id: I766b45eabd3058f9dd1ef56e6346194a3c9154d7 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipse.c17
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c16
2 files changed, 17 insertions, 16 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipse.c b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
index 20a2d35..9b1b6a1 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipse.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
@@ -523,6 +523,23 @@ static int _run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
setenv("SWT_GTK3","1",1);
}
}
+
+ char *overlayScrollbar = getenv("LIBOVERLAY_SCROLLBAR");
+ if (overlayScrollbar == NULL) {
+ setenv("LIBOVERLAY_SCROLLBAR", "0", 0);
+ }
+ char *oxygenGtkHack = getenv("OXYGEN_DISABLE_INNER_SHADOWS_HACK");
+ if (oxygenGtkHack == NULL) {
+ setenv("OXYGEN_DISABLE_INNER_SHADOWS_HACK", "1", 0);
+ }
+ char *gtk3 = getenv("SWT_GTK3");
+ if (gtk3 == NULL || strcmp(gtk3,"1") == 0) {
+ /* Work around for https://bugzilla.gnome.org/show_bug.cgi?id=677329, see Eclipse bug 435742 */
+ char *gdkCoreDeviceEvents = getenv("GDK_CORE_DEVICE_EVENTS");
+ if (gdkCoreDeviceEvents == NULL) {
+ setenv("GDK_CORE_DEVICE_EVENTS", "1", 0);
+ }
+ }
#endif
#endif
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 c697dfa..bb139e0 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
@@ -111,28 +111,12 @@ int loadGtk() {
#define DLFLAGS RTLD_LAZY
#endif
- char *overlayScrollbar = getenv("LIBOVERLAY_SCROLLBAR");
- if (overlayScrollbar == NULL) {
- setenv("LIBOVERLAY_SCROLLBAR", "0", 0);
- }
-
- char *oxygenGtkHack = getenv("OXYGEN_DISABLE_INNER_SHADOWS_HACK");
- if (oxygenGtkHack == NULL) {
- setenv("OXYGEN_DISABLE_INNER_SHADOWS_HACK", "1", 0);
- }
-
void *gioLib = NULL, *glibLib = NULL, *gdkLib = NULL, *gtkLib = NULL, *objLib = NULL, *pixLib = NULL;
char *gtk3 = getenv("SWT_GTK3");
if (gtk3 == NULL || strcmp(gtk3,"1") == 0) {
gdkLib = dlopen(GDK3_LIB, DLFLAGS);
gtkLib = dlopen(GTK3_LIB, DLFLAGS);
-
- /* Work around for https://bugzilla.gnome.org/show_bug.cgi?id=677329, see Eclipse bug 435742 */
- char *gdkCoreDeviceEvents = getenv("GDK_CORE_DEVICE_EVENTS");
- if (gdkCoreDeviceEvents == NULL) {
- setenv("GDK_CORE_DEVICE_EVENTS", "1", 0);
- }
}
if (!gtkLib || !gdkLib) { //if GTK+ 2
gdkLib = dlopen(GDK_LIB, DLFLAGS);