summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
diff options
context:
space:
mode:
authorDuong Nguyen <dnguyen>2008-08-20 19:43:03 +0000
committerDuong Nguyen <dnguyen>2008-08-20 19:43:03 +0000
commit498c28f9bc7c093881089c9d5a8a0b2646f4cc40 (patch)
tree77f546c48e0fa039b21bfe1fd539a6c554b2171a /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
parentbf4c318f3b06d9d908cfed97ca03e09810154460 (diff)
downloadeclipse.platform.swt-498c28f9bc7c093881089c9d5a8a0b2646f4cc40.tar.gz
eclipse.platform.swt-498c28f9bc7c093881089c9d5a8a0b2646f4cc40.tar.xz
eclipse.platform.swt-498c28f9bc7c093881089c9d5a8a0b2646f4cc40.zip
Bug 244396 - [DND] Combo on Linux does not fire DragSourceEvent.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index 029149cc62..c194081d8d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
@@ -1119,7 +1119,9 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
GdkEventButton gdkEvent = new GdkEventButton ();
OS.memmove (gdkEvent, event, GdkEventButton.sizeof);
- if (gdkEvent.type == OS.GDK_BUTTON_PRESS) return 0;
+ if (gdkEvent.type == OS.GDK_BUTTON_PRESS && gdkEvent.button == 1 && (style & SWT.READ_ONLY) != 0) {
+ return gtk_button_press_event(widget, event, false);
+ }
}
return super.gtk_button_press_event (widget, event);
}
@@ -1274,7 +1276,7 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
GdkEventButton gdkEventButton = new GdkEventButton ();
OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof);
if (gdkEventButton.button == 1) {
- if (!sendMouseEvent (SWT.MouseDown, gdkEventButton.button, display.clickCount, 0, false, gdkEventButton.time, gdkEventButton.x_root, gdkEventButton.y_root, false, gdkEventButton.state)) {
+ if ((style & SWT.READ_ONLY) != 0 && !sendMouseEvent (SWT.MouseDown, gdkEventButton.button, display.clickCount, 0, false, gdkEventButton.time, gdkEventButton.x_root, gdkEventButton.y_root, false, gdkEventButton.state)) {
return 1;
}
if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {