summaryrefslogtreecommitdiff
path: root/gtk/gtkpathbar.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-08-26 10:57:15 -0400
committerCarlos Garnacho <carlosg@gnome.org>2017-09-19 18:39:03 +0200
commit3b266de66cc9a2f286303aa3419065d6ebfd3dbf (patch)
treee1aa4d8029eea69ffcabca3f348b258aaa4bc752 /gtk/gtkpathbar.c
parent75b16ac855654b9b932a3fa29c523218163b3c04 (diff)
downloadgtk+-3b266de66cc9a2f286303aa3419065d6ebfd3dbf.tar.gz
path bar: Use GdkEvent API
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r--gtk/gtkpathbar.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 28c3e843a5..b51a452cb2 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -713,7 +713,10 @@ static gboolean
gtk_path_bar_scroll (GtkWidget *widget,
GdkEventScroll *event)
{
- switch (event->direction)
+ GdkScrollDirection direction;
+
+ gdk_event_get_scroll_direction ((GdkEvent*)event, &direction);
+ switch (direction)
{
case GDK_SCROLL_RIGHT:
case GDK_SCROLL_DOWN:
@@ -1001,8 +1004,12 @@ gtk_path_bar_slider_button_press (GtkWidget *widget,
GdkEventButton *event,
GtkPathBar *path_bar)
{
+ guint button;
+
+ gdk_event_get_button ((GdkEvent*)event, &button);
+
if (gdk_event_get_event_type ((GdkEvent *) event) != GDK_BUTTON_PRESS ||
- event->button != GDK_BUTTON_PRIMARY)
+ button != GDK_BUTTON_PRIMARY)
return FALSE;
path_bar->priv->ignore_click = FALSE;