event: Do not generate click count for SCROLL events

The ClutterScrollEvent structure does not have a click count field,
so Clutter should not generate the click count for events of type
CLUTTER_SCROLL.
This commit is contained in:
Emmanuele Bassi 2010-02-04 18:29:47 +00:00
parent 15c6fef7e3
commit 0ea25d661b

View File

@ -2084,7 +2084,8 @@ event_click_count_generate (ClutterEvent *event)
break; break;
default: default:
g_assert (NULL); g_assert_not_reached ();
break;
} }
if (event->type == CLUTTER_BUTTON_PRESS && device != NULL) if (event->type == CLUTTER_BUTTON_PRESS && device != NULL)
@ -2411,7 +2412,9 @@ _clutter_process_event_details (ClutterActor *stage,
x, y, x, y,
actor); actor);
if (event->type != CLUTTER_MOTION) /* button presses and releases need a click count */
if (event->type == CLUTTER_BUTTON_PRESS ||
event->type == CLUTTER_BUTTON_RELEASE)
{ {
/* Generate click count */ /* Generate click count */
event_click_count_generate (event); event_click_count_generate (event);