[PATCH libinput 01/13] filter: store the raw dpi value in the filter
Peter Hutterer
peter.hutterer at who-t.net
Mon Dec 19 05:20:52 UTC 2016
Currently unused, will be used in the future.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/filter.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/filter.c b/src/filter.c
index 4b15c30..eecf4ca 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -154,6 +154,7 @@ struct pointer_accelerator {
double incline; /* incline of the function */
double dpi_factor;
+ int dpi;
};
struct pointer_accelerator_flat {
@@ -161,6 +162,7 @@ struct pointer_accelerator_flat {
double factor;
double dpi_factor;
+ int dpi;
};
struct tablet_accelerator_flat {
@@ -775,6 +777,7 @@ create_default_filter(int dpi)
filter->incline = DEFAULT_INCLINE;
filter->dpi_factor = dpi/(double)DEFAULT_MOUSE_DPI;
+ filter->dpi = dpi;
return filter;
}
@@ -877,6 +880,7 @@ create_pointer_accelerator_filter_lenovo_x230(int dpi)
filter->incline = X230_INCLINE; /* incline of the acceleration function */
filter->dpi_factor = 1; /* unused for this accel method */
+ filter->dpi = dpi;
return &filter->base;
}
@@ -904,6 +908,7 @@ create_pointer_accelerator_filter_trackpoint(int dpi)
filter->threshold = DEFAULT_THRESHOLD;
filter->accel = DEFAULT_ACCELERATION;
filter->incline = DEFAULT_INCLINE;
+ filter->dpi = dpi;
return &filter->base;
}
@@ -980,6 +985,7 @@ create_pointer_accelerator_filter_flat(int dpi)
filter->base.interface = &accelerator_interface_flat;
filter->dpi_factor = dpi/(double)DEFAULT_MOUSE_DPI;
+ filter->dpi = dpi;
return &filter->base;
}
--
2.9.3
More information about the wayland-devel
mailing list