summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorSilenio Quarti2013-03-21 17:56:48 (EDT)
committer Carolyn MacLeod2013-04-09 10:56:51 (EDT)
commit6852fdd69a046e5dbfe48380b60d45da53048fbc (patch)
tree293b86e6f590b8ab8c48c6ebf51b5238f7bd8b56
parent89c2d5a94211d4c4787a1484dbd22955476c7567 (diff)
downloadeclipse.platform.swt-6852fdd69a046e5dbfe48380b60d45da53048fbc.zip
eclipse.platform.swt-6852fdd69a046e5dbfe48380b60d45da53048fbc.tar.gz
eclipse.platform.swt-6852fdd69a046e5dbfe48380b60d45da53048fbc.tar.bz2
Bug 393793 - [GTK3] Scroll wheel does not work in editor or package explorer
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java2
3 files changed, 3 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c
index 03a8e99..8152b8c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c
@@ -342,10 +342,6 @@ void swt_fixed_restack (SwtFixed *fixed, GtkWidget *widget, GtkWidget *sibling,
priv->children = g_list_remove_link (priv->children, list);
g_list_free_1 (list);
-// fprintf(stdout, "here1 c=%ld %s\n", child->widget, g_type_name(G_OBJECT_TYPE(child->widget)));
-// fflush(stdout);
-
-
list = NULL;
if (sibling) {
list = priv->children;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index 3936921..df440a7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -241,6 +241,8 @@ public class OS extends C {
public static final int GDK_SCROLL_LEFT = 2;
public static final int GDK_SCROLL_RIGHT = 3;
public static final int GDK_SCROLL_SMOOTH = 4;
+ public static final int GDK_SCROLL_MASK = 1 << 21;
+ public static final int GDK_SMOOTH_SCROLL_MASK = 1 << 23;
public static final int GDK_SELECTION_CLEAR = 17;
public static final int GDK_SELECTION_NOTIFY = 19;
public static final int GDK_SELECTION_REQUEST = 18;
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 ea5b028..f8bf2aa 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
@@ -293,7 +293,7 @@ void hookEvents () {
/* Connect the mouse signals */
long /*int*/ eventHandle = eventHandle ();
- int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK;
+ int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | OS.GDK_SCROLL_MASK | OS.GDK_SMOOTH_SCROLL_MASK;
OS.gtk_widget_add_events (eventHandle, eventMask);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.closures [BUTTON_PRESS_EVENT], false);
OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.closures [BUTTON_RELEASE_EVENT], false);