diff options
author | Leo Ufimtsev | 2018-01-18 01:45:53 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-01-18 10:00:34 +0000 |
commit | 5282e51a49c640f347e112faa9b2305ff5ed4111 (patch) | |
tree | 94269df599f1c3a7989ed232128095ecf2684fa9 /features/org.eclipse.equinox.executable.feature/library/eclipse.c | |
parent | 0f594b4f96e383e0f8802a000fe4bfabfead093e (diff) | |
download | rt.equinox.framework-5282e51a49c640f347e112faa9b2305ff5ed4111.tar.gz rt.equinox.framework-5282e51a49c640f347e112faa9b2305ff5ed4111.tar.xz rt.equinox.framework-5282e51a49c640f347e112faa9b2305ff5ed4111.zip |
Bug 528414 (swtWaylandLauncher) Part 2: Replace x11 with gdbus
eclipseGtk.c overhaul replacing x11 machinery with gio's gdbus for
wayland support.
Results:
- Launcher works on wayland
- All x11 is gone (at least for gtk3).
- Files no longer separated via colons.
- Verified on Wayland (and x11).
- Also added a makefile to accelerate future development efforts and
make it
more obvious on how to test launcher.
Technical notes:
- Old machinery used to set windowProperty via x11 atoms,
files were separated via colons ':'. This had issues with local urls'.
- New machinery checks if there is a session on:
org.eclipse.swt
and if so, it passes files via a gdbus array with each file
being a separate item. (I.e, colons not used anymore).
- The mutex/launcher window stuff was all related to x11. gdbus
doesn't use that anymore, locks are internall to gtk/glib.
- A few additional minor fixes/patches (code style etc...).
Test Strategy:
- Below were done on both Wayland and X11:
- Fedora 27, Gtk3.22. (Probably works on gtk2, but not tested).
1) Open eclipse with file(s) :
./eclipse /tmp/myfile1 [OK]
./eclipse /tmp/myfile1 /tmp/myfile2 [OK]
2) Open multiple eclipses at the same time: [OK]
./eclipse /tmp/myfile1 /tmp/myfile2 & ./eclipse /tmp/myfile3
/tmp/myfile3
3) Open eclipse. Once opened, run launcher again to pass files. [OK]
./eclipse
...
./eclipse /tmp/myfile
4) Open eclipse with launcher flag:
./eclipse --launcher.openFile /tmp/myfile1
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=528414
Change-Id: I73ab1e8b603deee803693f022f0c4c90ea3c43c9
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Diffstat (limited to 'features/org.eclipse.equinox.executable.feature/library/eclipse.c')
-rw-r--r-- | features/org.eclipse.equinox.executable.feature/library/eclipse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipse.c b/features/org.eclipse.equinox.executable.feature/library/eclipse.c index 4ff218722..9ab57f740 100644 --- a/features/org.eclipse.equinox.executable.feature/library/eclipse.c +++ b/features/org.eclipse.equinox.executable.feature/library/eclipse.c @@ -1103,6 +1103,12 @@ static void getVMCommand( int launchMode, int argc, _TCHAR* argv[], _TCHAR **vmA /* If the user specified "-vmargs", add them instead of the default VM args. */ vmArg = (userVMarg != NULL) ? userVMarg : getArgVM( (launchMode == LAUNCH_JNI) ? jniLib : javaVM ); +#ifdef LINUX + // Append flags needed for SWT to understand it's started from launcher to provide things like dbus support. + vmArg = concatArgs(vmArg, gtkPlatformJavaSystemProperties); +#endif + + adjustVMArgs(javaVM, jniLib, &vmArg); /* Calculate the number of VM arguments. */ |