Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Pun2017-01-16 19:24:42 +0000
committerLeo Ufimtsev2017-03-14 19:57:54 +0000
commit157a34b45432073f47e48a5b828912872b7af91a (patch)
treed2be43e1df3d7c735ce4be69ffecdf5ca1edacd8 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
parent6cdabca59de9a57692b24da180f04cc98307f448 (diff)
downloadeclipse.platform.swt-157a34b45432073f47e48a5b828912872b7af91a.tar.gz
eclipse.platform.swt-157a34b45432073f47e48a5b828912872b7af91a.tar.xz
eclipse.platform.swt-157a34b45432073f47e48a5b828912872b7af91a.zip
Bug 510446 - [wayland] StyledText DnD not signalling, move drag
detection to mouse_move Drag detection is moved over to mouse movement instead of on mouse click.The current way of handling drag detection on mouse click is broken in Wayland as we cannot hold the mouse click event until a new event comes up. Change-Id: Ib5effea9e44021593bf409481cd8833f2e057be0 Signed-off-by: Ian Pun <ipun@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
index 5b31bc46fc..9286b4692e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
@@ -361,6 +361,14 @@ void dragEnd(long /*int*/ widget, long /*int*/ context){
event.doit = operation != 0;
event.detail = operation;
notifyListeners(DND.DragEnd, event);
+ /*
+ * send a mouse Up signal for >GTK3.14 as Wayland (support as of 3.14)
+ * does not trigger a MouseUp/Mouse_release_event on DragEnd.
+ * See Bug 510446.
+ */
+ if (OS.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
+ control.notifyListeners(SWT.MouseUp, event);
+ }
moveData = false;
}

Back to the top