aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Barkovic2014-08-04 18:11:47 (EDT)
committerJoshua Barkovic2014-08-04 18:11:47 (EDT)
commit4322410c4d40e827accba600cd57aa58183aefbd (patch)
tree496c04183eb3c429470d455c8a3f7b9f3f7302d4
parent9a580681c9eee59381514c38b579766131335087 (diff)
downloadeclipse.platform.swt-4322410c4d40e827accba600cd57aa58183aefbd.zip
eclipse.platform.swt-4322410c4d40e827accba600cd57aa58183aefbd.tar.gz
eclipse.platform.swt-4322410c4d40e827accba600cd57aa58183aefbd.tar.bz2
Bug 440816 - [Wayland] Need to guard X11 code in Programrefs/changes/62/30762/2
Re-worked program flow under in Program.java under Wayland Code assumes that GIO is avail when Wayland is present. The checks that were required in X11 are now avoided in Wayland and the result is returned early. Change-Id: I7ee3d4cb650d2d18cf4a49fcd06471728c11eb3f Signed-off-by: Joshua Barkovic <joshbarkovic@gmail.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
index 89ed957..e6afd0e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
@@ -73,6 +73,12 @@ static int getDesktop(final Display display) {
if (desktopValue != null) return desktopValue.intValue();
int desktop = DESKTOP_UNKNOWN;
+ if (OS.GDK_WINDOWING_WAYLAND ()) {
+ desktop = DESKTOP_GIO;
+ display.setData(DESKTOP_DATA, new Integer(desktop));
+ return desktop;
+ }
+
/* Get the list of properties on the root window. */
long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
long /*int*/ rootWindow = OS.XDefaultRootWindow(xDisplay);