projects
/
platform
/
upstream
/
libinput.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6fc7c3
)
evdev: Reset accumulate values when we flush motion events
author
Kristian Høgsberg
<krh@bitplanet.net>
Fri, 18 Nov 2011 15:42:34 +0000
(10:42 -0500)
committer
Jonas Ådahl
<jadahl@gmail.com>
Sun, 10 Nov 2013 16:51:26 +0000
(17:51 +0100)
Otherwise we end up reporting all motion events twice.
compositor/evdev.c
patch
|
blob
|
history
diff --git
a/compositor/evdev.c
b/compositor/evdev.c
index
784fa4c
..
5138c09
100644
(file)
--- a/
compositor/evdev.c
+++ b/
compositor/evdev.c
@@
-229,9
+229,14
@@
evdev_input_device_data(int fd, uint32_t mask, void *data)
/* we try to minimize the amount of notifications to be
* forwarded to the compositor, so we accumulate motion
* events and send as a bunch */
- if (!is_motion_event(e))
+ if (!is_motion_event(e))
{
evdev_flush_motion(&device->master->base.input_device,
time, x, y, dx, dy, absolute_event);
+ dx = 0;
+ dy = 0;
+ absolute_event = 0;
+ }
+
switch (e->type) {
case EV_REL:
evdev_process_relative_motion(e, &dx, &dy);