[clutter] stage: implement touch event throttling
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] stage: implement touch event throttling
- Date: Wed, 9 Oct 2013 20:58:27 +0000 (UTC)
commit 90c05e98a8cbf3748758af5a11dfa129d8334c46
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Wed Oct 9 18:35:59 2013 +0100
stage: implement touch event throttling
https://bugzilla.gnome.org/show_bug.cgi?id=709761
clutter/clutter-stage.c | 38 +++++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 13 deletions(-)
---
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index 9939628..d641180 100644
--- a/clutter/clutter-stage.c
+++ b/clutter/clutter-stage.c
@@ -921,19 +921,31 @@ _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 &&
- (next_event->type == CLUTTER_MOTION ||
- next_event->type == CLUTTER_LEAVE) &&
- (!check_device || (device == next_device)))
- {
- CLUTTER_NOTE (EVENT,
- "Omitting motion event at %d, %d",
- (int) event->motion.x,
- (int) event->motion.y);
- goto next_event;
- }
+ 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)))
+ {
+ CLUTTER_NOTE (EVENT,
+ "Omitting motion event at %d, %d",
+ (int) event->motion.x,
+ (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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]