Commit 61f4dc4b authored by Emmanuele Bassi's avatar Emmanuele Bassi

docs: Handle smooth scrolling in cookbook example

We're missing the CLUTTER_SCROLL_SMOOTH case in the switch over the
scroll direction, and the compiler complains about it.
parent 23724131
......@@ -33,6 +33,16 @@ _scroll_event_cb (ClutterActor *viewport,
y += SCROLL_AMOUNT;
break;
case CLUTTER_SCROLL_SMOOTH:
{
double d_x, d_y;
clutter_event_get_scroll_delta (event, &d_x, &d_y);
y += d_y;
}
break;
/* we're only interested in up and down */
case CLUTTER_SCROLL_LEFT:
case CLUTTER_SCROLL_RIGHT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment