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:
e18e9d5
)
filter: Fix get_direction for short vectors
author
Jonas Ådahl
<jadahl@gmail.com>
Sat, 24 May 2014 19:38:08 +0000
(21:38 +0200)
committer
Jonas Ådahl
<jadahl@gmail.com>
Thu, 29 May 2014 11:06:39 +0000
(13:06 +0200)
Short vectors alongside the x axis produced inverted directions.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/filter.c
patch
|
blob
|
history
diff --git
a/src/filter.c
b/src/filter.c
index 45f060f923f0fa6e55a7d0e8c820f8a6c70486d9..df4d60a4b7a8441b8e9431af006bb59e8ab234ef 100644
(file)
--- a/
src/filter.c
+++ b/
src/filter.c
@@
-105,9
+105,9
@@
get_direction(int dx, int dy)
else if (dx < 0 && dy < 0)
dir = N | NW | W;
else if (dx > 0)
- dir = NW | W | SW;
- else if (dx < 0)
dir = NE | E | SE;
+ else if (dx < 0)
+ dir = NW | W | SW;
else if (dy > 0)
dir = SE | S | SW;
else if (dy < 0)