app: gimp_motion_buffer_eval_event(): always set last_read_motion_time
We need it for correctly requesting device history, so we must remember it also when returning FALSE and ignoring the event.
This commit is contained in:
@ -218,6 +218,11 @@ gimp_motion_buffer_eval_event (GimpMotionBuffer *buffer,
|
|||||||
gdouble distance = 1.0;
|
gdouble distance = 1.0;
|
||||||
gboolean event_fill = (inertia_factor > 0.0);
|
gboolean event_fill = (inertia_factor > 0.0);
|
||||||
|
|
||||||
|
/* the last_read_motion_time most be set unconditionally, so set
|
||||||
|
* it early
|
||||||
|
*/
|
||||||
|
buffer->last_read_motion_time = time;
|
||||||
|
|
||||||
/* Smoothing causes problems with cursor tracking when zoomed above
|
/* Smoothing causes problems with cursor tracking when zoomed above
|
||||||
* screen resolution so we need to supress it.
|
* screen resolution so we need to supress it.
|
||||||
*/
|
*/
|
||||||
@ -377,8 +382,6 @@ gimp_motion_buffer_eval_event (GimpMotionBuffer *buffer,
|
|||||||
|
|
||||||
g_array_append_val (buffer->event_queue, *coords);
|
g_array_append_val (buffer->event_queue, *coords);
|
||||||
|
|
||||||
buffer->last_read_motion_time = time;
|
|
||||||
|
|
||||||
buffer->last_coords = *coords;
|
buffer->last_coords = *coords;
|
||||||
buffer->last_motion_time = time;
|
buffer->last_motion_time = time;
|
||||||
buffer->last_motion_delta_time = delta_time;
|
buffer->last_motion_delta_time = delta_time;
|
||||||
|
@ -38,8 +38,9 @@ struct _GimpMotionBuffer
|
|||||||
{
|
{
|
||||||
GimpObject parent_instance;
|
GimpObject parent_instance;
|
||||||
|
|
||||||
guint32 last_motion_time; /* previous time of a forwarded motion event */
|
|
||||||
guint32 last_read_motion_time;
|
guint32 last_read_motion_time;
|
||||||
|
|
||||||
|
guint32 last_motion_time; /* previous time of a forwarded motion event */
|
||||||
gdouble last_motion_delta_time;
|
gdouble last_motion_delta_time;
|
||||||
gdouble last_motion_delta_x;
|
gdouble last_motion_delta_x;
|
||||||
gdouble last_motion_delta_y;
|
gdouble last_motion_delta_y;
|
||||||
|
Reference in New Issue
Block a user