summaryrefslogtreecommitdiff
path: root/baobab/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-10-25 16:37:48 +0300
committermonsta <[email protected]>2017-10-25 16:39:47 +0300
commitfb08738be8ecb8af6008b713a0fbe0770954148e (patch)
tree0bd0484fc4b3509c7e6376b8b52dae4dca6686b9 /baobab/src
parent5bc0484ea03b7a45739358d3b01d298ddf3a916f (diff)
downloadmate-utils-fb08738be8ecb8af6008b713a0fbe0770954148e.tar.bz2
mate-utils-fb08738be8ecb8af6008b713a0fbe0770954148e.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
Diffstat (limited to 'baobab/src')
-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;