summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-10-25 16:37:48 +0300
committermonsta <[email protected]>2017-10-25 17:32:35 +0300
commit84bf2bd41aa966236b33c0565d0d1eb43244be68 (patch)
treed87b73ea7deb1c05ec44f0844a29c98287b586d3
parentc3c2a752e1642d56923d01a3d9ee98f431aaf2fd (diff)
downloadmate-utils-84bf2bd41aa966236b33c0565d0d1eb43244be68.tar.bz2
mate-utils-84bf2bd41aa966236b33c0565d0d1eb43244be68.tar.xz
baobab: make zoom with mousewheel work on chart
like it was with GTK+2 ported from: https://git.gnome.org/browse/baobab/commit/?id=66ad37228e155fe6707064109eae2dd17cc1e969 https://git.gnome.org/browse/baobab/commit/?id=d724a028d54fea765dda4578a1f30910e77ab1a9
-rw-r--r--baobab/src/baobab-chart.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/baobab/src/baobab-chart.c b/baobab/src/baobab-chart.c
index d981c773..7848bdef 100644
--- a/baobab/src/baobab-chart.c
+++ b/baobab/src/baobab-chart.c
@@ -320,7 +320,7 @@ baobab_chart_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
+ attributes.event_mask = gtk_widget_get_events (widget);
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
@@ -336,7 +336,8 @@ baobab_chart_realize (GtkWidget *widget)
gtk_widget_add_events (widget,
GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK | GDK_LEAVE_NOTIFY_MASK);
+ GDK_POINTER_MOTION_HINT_MASK | GDK_LEAVE_NOTIFY_MASK |
+ GDK_SCROLL_MASK);
}
static void
@@ -969,6 +970,12 @@ baobab_chart_scroll (GtkWidget *widget,
if (baobab_chart_can_zoom_in (widget))
baobab_chart_zoom_in (widget);
break;
+
+ case GDK_SCROLL_SMOOTH :
+ /* since we don't add GDK_SMOOTH_SCROLL_MASK to received
+ events, this is actually never reached and it's here
+ just to silence compiler warnings */
+ break;
}
return FALSE;