aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-01-20 00:44:40 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2015-08-27 14:59:27 +1000
commit034be31159f22ce28d84994d541a45ee44963fd8 (patch)
tree1cd4d585e116197d5ff282c6285cd4818e2f6d5a /src/evdev.h
parentAdd the default evdev config (diff)
downloadxf86-input-evdev-034be31159f22ce28d84994d541a45ee44963fd8.tar.gz
xf86-input-evdev-034be31159f22ce28d84994d541a45ee44963fd8.tar.bz2
xf86-input-evdev-034be31159f22ce28d84994d541a45ee44963fd8.zip
Add "Resolution" option for mice to the evdev driver
It can be used to scale the resolution of a mouse to that of a 1000 DPI mouse. This can be useful to make high resolution mice less sensitive without turning off acceleration. The target of 1000 DPI is used as the same default is used in libinput. If the option is not set no scaling will be done. https://bugs.freedesktop.org/show_bug.cgi?id=88134 Signed-off-by: Thomas Hindoe Paaboel Andersen <phomes@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/evdev.h b/src/evdev.h
index 0f71d78..4d44d2b 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -97,6 +97,8 @@
/* Number of longs needed to hold the given number of bits */
#define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
+#define DEFAULT_MOUSE_DPI 1000.0
+
/* Function key mode */
enum fkeymode {
FKEYMODE_UNKNOWN = 0,
@@ -170,6 +172,7 @@ typedef struct {
BOOL swap_axes;
BOOL invert_x;
BOOL invert_y;
+ int resolution;
unsigned int abs_queued, rel_queued, prox_queued;
@@ -191,7 +194,7 @@ typedef struct {
int button; /* phys button to emit */
int threshold; /* move threshold in dev coords */
OsTimerPtr timer;
- int delta[2]; /* delta x/y, accumulating */
+ double delta[2]; /* delta x/y, accumulating */
int startpos[2]; /* starting pos for abs devices */
int flags; /* remember if we had rel or abs movement */
} emulate3B;
@@ -269,7 +272,7 @@ BOOL Evdev3BEmuFilterEvent(InputInfoPtr, int, BOOL);
void Evdev3BEmuPreInit(InputInfoPtr pInfo);
void Evdev3BEmuOn(InputInfoPtr);
void Evdev3BEmuFinalize(InputInfoPtr);
-void Evdev3BEmuProcessRelMotion(InputInfoPtr pInfo, int dx, int dy);
+void Evdev3BEmuProcessRelMotion(InputInfoPtr pInfo, double dx, double dy);
void Evdev3BEmuProcessAbsMotion(InputInfoPtr pInfo, ValuatorMask *vals);
/* Mouse Wheel emulation */