From 6852fdd69a046e5dbfe48380b60d45da53048fbc Mon Sep 17 00:00:00 2001 From: Silenio Quarti Date: Thu, 21 Mar 2013 17:56:48 -0400 Subject: Bug 393793 - [GTK3] Scroll wheel does not work in editor or package explorer --- bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c | 4 ---- .../Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java | 2 ++ .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java | 2 +- 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 03a8e999a0..8152b8c7a7 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 3936921566..df440a752f 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 ea5b02892a..f8bf2aa47a 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); -- cgit v1.2.3