mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
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
This commit is contained in:
parent
74882b2502
commit
a70ae50ca9
@ -962,6 +962,7 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
|
|||||||
ClutterEvent *next_event;
|
ClutterEvent *next_event;
|
||||||
ClutterInputDevice *device;
|
ClutterInputDevice *device;
|
||||||
ClutterInputDevice *next_device;
|
ClutterInputDevice *next_device;
|
||||||
|
ClutterInputDeviceType device_type;
|
||||||
gboolean check_device = FALSE;
|
gboolean check_device = FALSE;
|
||||||
|
|
||||||
event = l->data;
|
event = l->data;
|
||||||
@ -977,8 +978,16 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
|
|||||||
if (device != NULL && next_device != NULL)
|
if (device != NULL && next_device != NULL)
|
||||||
check_device = TRUE;
|
check_device = TRUE;
|
||||||
|
|
||||||
/* Skip consecutive motion events coming from the same device */
|
device_type = clutter_input_device_get_device_type (device);
|
||||||
if (priv->throttle_motion_events && next_event != NULL)
|
|
||||||
|
/* 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 &&
|
if (event->type == CLUTTER_MOTION &&
|
||||||
(next_event->type == CLUTTER_MOTION ||
|
(next_event->type == CLUTTER_MOTION ||
|
||||||
|
Loading…
Reference in New Issue
Block a user