From: Rafał Długołęcki Date: Sun, 25 Jan 2015 23:44:18 +0000 (+0100) Subject: More generic use of event. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=9e178d8a0540a2fc22b983fc70daab93cc229bd4;p=familia.git More generic use of event. --- diff --git a/src/ui/drawing_area.c b/src/ui/drawing_area.c index 3457998..1644847 100644 --- a/src/ui/drawing_area.c +++ b/src/ui/drawing_area.c @@ -156,7 +156,7 @@ void drawing_area_unrealize (GtkWidget *widget, gpointer data) * drawing area using mouse or touchpad. */ void drawing_area_event_scroll (GtkWidget *widget, - GdkEventScroll *event, FamiliaData *data) + GdkEvent *event, FamiliaData *data) { GtkAdjustment *adjustment = NULL; gdouble value = 0; @@ -164,7 +164,7 @@ void drawing_area_event_scroll (GtkWidget *widget, assert(event->type == GDK_SCROLL); - switch(event->direction) { + switch(event->scroll.direction) { case GDK_SCROLL_UP: adjustment = data->vadjustment; step = 1; @@ -181,6 +181,8 @@ void drawing_area_event_scroll (GtkWidget *widget, adjustment = data->hadjustment; step = 1; break; + default: + break; } if (adjustment != NULL) {