aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Barkovic2014-07-09 21:40:50 (EDT)
committerAlexander Kurtakov2014-07-16 04:23:07 (EDT)
commit2788992449f42c68294c7306e4dbf7f44afd21ac (patch)
tree071622d099e0231f1b9311dc8e61519cf155c27e
parent807366ceccc074335641488dd09c21024735cd07 (diff)
downloadeclipse.platform.swt-2788992449f42c68294c7306e4dbf7f44afd21ac.zip
eclipse.platform.swt-2788992449f42c68294c7306e4dbf7f44afd21ac.tar.gz
eclipse.platform.swt-2788992449f42c68294c7306e4dbf7f44afd21ac.tar.bz2
"Bug 439301 - Setting Cursor can cause crash on Wayland system"refs/changes/11/29711/3
Revised logic in if statements. Will now prefer the gdk function if Wayland is detected. Change-Id: If917ae1d72be1fdc290d9f9115e5bfd9b618bf4b Signed-off-by: Joshua Barkovic <joshbarkovic@gmail.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 0587208..fafbdbd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -4223,7 +4223,7 @@ void setCursor (long /*int*/ cursor) {
long /*int*/ window = eventWindow ();
if (window != 0) {
OS.gdk_window_set_cursor (window, cursor);
- if (OS.GDK_WINDOWING_WAYLAND() || !OS.GDK_WINDOWING_X11 ()) {
+ if (!OS.GDK_WINDOWING_X11 () || OS.GDK_WINDOWING_WAYLAND ()) {
OS.gdk_flush ();
} else {
long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index bca5915..b64d2f9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -1823,7 +1823,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
void setCursor (long /*int*/ cursor) {
if (enableWindow != 0) {
OS.gdk_window_set_cursor (enableWindow, cursor);
- if (!OS.GDK_WINDOWING_X11 ()) {
+ if (!OS.GDK_WINDOWING_X11 () || OS.GDK_WINDOWING_WAYLAND()) {
OS.gdk_flush ();
} else {
long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());