GNOME Bugzilla – Bug 683870
test-events only reports up/down scrolls
Last modified: 2012-09-12 18:10:50 UTC
Currently test-events reports all non-"up" scroll events as "down". Patch attached to correctly report "left" and "right" scrolls and print the scroll delta for "smooth" events.
Created attachment 224105 [details] [review] tests: handle smooth scroll events in test-events Print the precise scroll delta for smooth scroll events and correctly print the direction for left/right scrolls.
Review of attachment 224105 [details] [review]: looks good. please, fix the coding style before pushing to master. ::: tests/interactive/test-events.c @@ +256,3 @@ case CLUTTER_SCROLL: + { + ClutterScrollDirection dir = clutter_event_get_scroll_direction(event); missing space between function and parenthesis @@ +261,3 @@ + { + gdouble dx, dy; + clutter_event_get_scroll_delta(event, &dx, &dy); missing space between function and parenthesis @@ +263,3 @@ + clutter_event_get_scroll_delta(event, &dx, &dy); + g_print ("[%s] BUTTON SCROLL (direction:smooth %.02f,%.02f)", + clutter_actor_get_name (source_actor), dx, dy); arguments should be aligned to the open parenthesis @@ +267,3 @@ + else + g_print ("[%s] BUTTON SCROLL (direction:%s)", + clutter_actor_get_name (source_actor), arguments should be aligned to the open parenthesis
The following fix has been pushed: 47347d5 tests: handle smooth scroll events in test-events
Created attachment 224110 [details] [review] tests: handle smooth scroll events in test-events Print the precise scroll delta for smooth scroll events and correctly print the direction for left/right scrolls.
The following fix has been pushed: 6899eb5 tests: style fixes to test-events
Created attachment 224136 [details] [review] tests: style fixes to test-events Oops, I pushed the commit without the style fixes. Followup commit for 47347d5.