stage: implement touch event throttling
https://bugzilla.gnome.org/show_bug.cgi?id=709761
This commit is contained in:
parent
1546e48e04
commit
c87b794739
@ -1041,9 +1041,9 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
|
||||
check_device = TRUE;
|
||||
|
||||
/* Skip consecutive motion events coming from the same device */
|
||||
if (priv->throttle_motion_events &&
|
||||
next_event != NULL &&
|
||||
event->type == CLUTTER_MOTION &&
|
||||
if (priv->throttle_motion_events && next_event != NULL)
|
||||
{
|
||||
if (event->type == CLUTTER_MOTION &&
|
||||
(next_event->type == CLUTTER_MOTION ||
|
||||
next_event->type == CLUTTER_LEAVE) &&
|
||||
(!check_device || (device == next_device)))
|
||||
@ -1054,6 +1054,18 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
|
||||
(int) event->motion.y);
|
||||
goto next_event;
|
||||
}
|
||||
else if (event->type == CLUTTER_TOUCH_UPDATE &&
|
||||
(next_event->type == CLUTTER_TOUCH_UPDATE ||
|
||||
next_event->type == CLUTTER_LEAVE) &&
|
||||
(!check_device || (device == next_device)))
|
||||
{
|
||||
CLUTTER_NOTE (EVENT,
|
||||
"Omitting touch update event at %d, %d",
|
||||
(int) event->touch.x,
|
||||
(int) event->touch.y);
|
||||
goto next_event;
|
||||
}
|
||||
}
|
||||
|
||||
_clutter_process_event (event);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user