[mutter] clutter: Do not throttle motion events on tablet tools
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter: Do not throttle motion events on tablet tools
- Date: Mon, 3 Jul 2017 12:32:20 +0000 (UTC)
commit a70ae50ca9b9154b52d92826479ca29842487c15
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jun 29 23:42:43 2017 +0200
clutter: Do not throttle motion events on tablet tools
Events from tablets must not be filtered out, as the event coalescing
results in precision loss.
https://bugzilla.gnome.org/show_bug.cgi?id=783535
clutter/clutter/clutter-stage.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index a3ee001..d1dfdd2 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -962,6 +962,7 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
ClutterEvent *next_event;
ClutterInputDevice *device;
ClutterInputDevice *next_device;
+ ClutterInputDeviceType device_type;
gboolean check_device = FALSE;
event = l->data;
@@ -977,8 +978,16 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
if (device != NULL && next_device != NULL)
check_device = TRUE;
- /* Skip consecutive motion events coming from the same device */
- if (priv->throttle_motion_events && next_event != NULL)
+ device_type = clutter_input_device_get_device_type (device);
+
+ /* Skip consecutive motion events coming from the same device,
+ * except those of tablet tools, since users of these events
+ * want no precision loss.
+ */
+ if (priv->throttle_motion_events && next_event != NULL &&
+ device_type != CLUTTER_TABLET_DEVICE &&
+ device_type != CLUTTER_PEN_DEVICE &&
+ device_type != CLUTTER_ERASER_DEVICE)
{
if (event->type == CLUTTER_MOTION &&
(next_event->type == CLUTTER_MOTION ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]