After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683870 - test-events only reports up/down scrolls
test-events only reports up/down scrolls
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-09-12 13:01 UTC by Emanuele Aina
Modified: 2012-09-12 18:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: handle smooth scroll events in test-events (1.90 KB, patch)
2012-09-12 13:01 UTC, Emanuele Aina
accepted-commit_now Details | Review
tests: handle smooth scroll events in test-events (1.90 KB, patch)
2012-09-12 13:38 UTC, Emanuele Aina
committed Details | Review
tests: style fixes to test-events (1.99 KB, patch)
2012-09-12 18:10 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2012-09-12 13:01:47 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.
Comment 1 Emanuele Aina 2012-09-12 13:01:51 UTC
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.
Comment 2 Emmanuele Bassi (:ebassi) 2012-09-12 13:23:18 UTC
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
Comment 3 Emanuele Aina 2012-09-12 13:38:41 UTC
The following fix has been pushed:
47347d5 tests: handle smooth scroll events in test-events
Comment 4 Emanuele Aina 2012-09-12 13:38:45 UTC
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.
Comment 5 Emanuele Aina 2012-09-12 18:10:46 UTC
The following fix has been pushed:
6899eb5 tests: style fixes to test-events
Comment 6 Emanuele Aina 2012-09-12 18:10:50 UTC
Created attachment 224136 [details] [review]
tests: style fixes to test-events

Oops, I pushed the commit without the style fixes. Followup commit
for 47347d5.