mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
Compare commits
18 Commits
xf86-input
...
xf86-input
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b25d716165 | ||
|
|
41cf9212d0 | ||
|
|
75368052b5 | ||
|
|
16c85cbeac | ||
|
|
ae67f64f02 | ||
|
|
f6fcad8b10 | ||
|
|
d171b3d919 | ||
|
|
c3251deb4b | ||
|
|
cabed4bbb6 | ||
|
|
a75c43830e | ||
|
|
d9aadfd5f0 | ||
|
|
54a3120e33 | ||
|
|
164c62a975 | ||
|
|
43e270fb7a | ||
|
|
4ca57716ca | ||
|
|
0f16065b00 | ||
|
|
cae1478781 | ||
|
|
27926b3763 |
@@ -23,7 +23,7 @@
|
|||||||
# Initialize Autoconf
|
# Initialize Autoconf
|
||||||
AC_PREREQ([2.60])
|
AC_PREREQ([2.60])
|
||||||
AC_INIT([xf86-input-evdev],
|
AC_INIT([xf86-input-evdev],
|
||||||
[2.8.1],
|
[2.8.99.1],
|
||||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||||
[xf86-input-evdev])
|
[xf86-input-evdev])
|
||||||
AC_CONFIG_SRCDIR([Makefile.am])
|
AC_CONFIG_SRCDIR([Makefile.am])
|
||||||
@@ -48,6 +48,7 @@ PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto inputproto)
|
|||||||
PKG_CHECK_MODULES(UDEV, libudev)
|
PKG_CHECK_MODULES(UDEV, libudev)
|
||||||
|
|
||||||
PKG_CHECK_MODULES(XI22, [inputproto >= 2.1.99.3] [xorg-server >= 1.11.99.901], HAVE_XI22="yes", HAVE_XI22="no")
|
PKG_CHECK_MODULES(XI22, [inputproto >= 2.1.99.3] [xorg-server >= 1.11.99.901], HAVE_XI22="yes", HAVE_XI22="no")
|
||||||
|
PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
|
||||||
|
|
||||||
if test "x$HAVE_XI22" = xyes; then
|
if test "x$HAVE_XI22" = xyes; then
|
||||||
# Obtain compiler/linker options for mtdev
|
# Obtain compiler/linker options for mtdev
|
||||||
|
|||||||
@@ -87,4 +87,8 @@
|
|||||||
*/
|
*/
|
||||||
#define EVDEV_PROP_FUNCTION_KEYS "Evdev Function Keys"
|
#define EVDEV_PROP_FUNCTION_KEYS "Evdev Function Keys"
|
||||||
|
|
||||||
|
/* Smooth scroll */
|
||||||
|
/* INT32, 3 values (vertical, horizontal, dial) */
|
||||||
|
#define EVDEV_PROP_SCROLL_DISTANCE "Evdev Scrolling Distance"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -226,6 +226,18 @@ Specify the X Input 1.x type (see XListInputDevices(__libmansuffix__)).
|
|||||||
There is rarely a need to use this option, evdev will guess the device type
|
There is rarely a need to use this option, evdev will guess the device type
|
||||||
based on the device's capabilities. This option is provided for devices that
|
based on the device's capabilities. This option is provided for devices that
|
||||||
need quirks.
|
need quirks.
|
||||||
|
.TP 7
|
||||||
|
.BI "Option \*qVertScrollDelta\*q \*q" integer \*q
|
||||||
|
The amount of motion considered one unit of scrolling vertically.
|
||||||
|
Default: "1". Property: "Evdev Scrolling Distance".
|
||||||
|
.TP 7
|
||||||
|
.BI "Option \*qHorizScrollDelta\*q \*q" integer \*q
|
||||||
|
The amount of motion considered one unit of scrolling horizontally.
|
||||||
|
Default: "1". Property: "Evdev Scrolling Distance".
|
||||||
|
.TP 7
|
||||||
|
.BI "Option \*qDialDelta\*q \*q" integer \*q
|
||||||
|
The amount of motion considered one unit of turning the dial. Default: "1".
|
||||||
|
Property: "Evdev Scrolling Distance".
|
||||||
|
|
||||||
.SH SUPPORTED PROPERTIES
|
.SH SUPPORTED PROPERTIES
|
||||||
The following properties are provided by the
|
The following properties are provided by the
|
||||||
@@ -266,6 +278,9 @@ value.
|
|||||||
.TP 7
|
.TP 7
|
||||||
.BI "Evdev Wheel Emulation Timeout"
|
.BI "Evdev Wheel Emulation Timeout"
|
||||||
1 16-bit positive value.
|
1 16-bit positive value.
|
||||||
|
.TP 7
|
||||||
|
.BI "Evdev Scrolling Distance"
|
||||||
|
3 32-bit values: vertical, horizontal and dial.
|
||||||
|
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
Kristian Høgsberg, Peter Hutterer
|
Kristian Høgsberg, Peter Hutterer
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
|
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
|
||||||
|
|
||||||
AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
|
AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
|
||||||
AM_CPPFLAGS =-I$(top_srcdir)/include
|
AM_CPPFLAGS =-I$(top_srcdir)/include $(LIBEVDEV_CFLAGS)
|
||||||
|
|
||||||
@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
|
@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
|
||||||
@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
|
@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
|
||||||
@DRIVER_NAME@_drv_la_LIBADD = $(MTDEV_LIBS) $(UDEV_LIBS)
|
@DRIVER_NAME@_drv_la_LIBADD = $(MTDEV_LIBS) $(UDEV_LIBS) $(LIBEVDEV_LIBS)
|
||||||
@DRIVER_NAME@_drv_ladir = @inputdir@
|
@DRIVER_NAME@_drv_ladir = @inputdir@
|
||||||
|
|
||||||
@DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c \
|
@DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c \
|
||||||
|
|||||||
@@ -303,7 +303,8 @@ EvdevAppleInitProperty(DeviceIntPtr dev)
|
|||||||
enum fkeymode fkeymode;
|
enum fkeymode fkeymode;
|
||||||
|
|
||||||
if (!product_check(apple_keyboard_table,
|
if (!product_check(apple_keyboard_table,
|
||||||
pEvdev->id_vendor, pEvdev->id_product))
|
libevdev_get_id_vendor(pEvdev->dev),
|
||||||
|
libevdev_get_id_product(pEvdev->dev)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fkeymode = get_fnmode();
|
fkeymode = get_fnmode();
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv)
|
|||||||
EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
|
EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
|
||||||
WheelAxisPtr pAxis = NULL, pOtherAxis = NULL;
|
WheelAxisPtr pAxis = NULL, pOtherAxis = NULL;
|
||||||
int value = pEv->value;
|
int value = pEv->value;
|
||||||
int oldValue;
|
|
||||||
|
|
||||||
/* Has wheel emulation been configured to be enabled? */
|
/* Has wheel emulation been configured to be enabled? */
|
||||||
if (!pEvdev->emulateWheel.enabled)
|
if (!pEvdev->emulateWheel.enabled)
|
||||||
@@ -115,12 +114,15 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We don't want to intercept real mouse wheel events */
|
|
||||||
if(pEv->type == EV_ABS) {
|
if(pEv->type == EV_ABS) {
|
||||||
int axis = pEvdev->abs_axis_map[pEv->code];
|
int axis = pEvdev->abs_axis_map[pEv->code];
|
||||||
oldValue = valuator_mask_get(pEvdev->vals, axis);
|
int oldValue;
|
||||||
valuator_mask_set(pEvdev->vals, axis, value);
|
|
||||||
value -= oldValue; /* make value into a differential measurement */
|
if (axis > -1 && valuator_mask_fetch(pEvdev->old_vals, axis, &oldValue)) {
|
||||||
|
valuator_mask_set(pEvdev->vals, axis, value);
|
||||||
|
value -= oldValue; /* make value into a differential measurement */
|
||||||
|
} else
|
||||||
|
value = 0; /* avoid a jump on the first touch */
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(pEv->code) {
|
switch(pEv->code) {
|
||||||
|
|||||||
629
src/evdev.c
629
src/evdev.c
File diff suppressed because it is too large
Load Diff
17
src/evdev.h
17
src/evdev.h
@@ -47,6 +47,8 @@
|
|||||||
#include <mtdev.h>
|
#include <mtdev.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <libevdev/libevdev.h>
|
||||||
|
|
||||||
#ifndef EV_CNT /* linux 2.6.23 kernels and earlier lack _CNT defines */
|
#ifndef EV_CNT /* linux 2.6.23 kernels and earlier lack _CNT defines */
|
||||||
#define EV_CNT (EV_MAX+1)
|
#define EV_CNT (EV_MAX+1)
|
||||||
#endif
|
#endif
|
||||||
@@ -150,8 +152,7 @@ typedef struct {
|
|||||||
} EventQueueRec, *EventQueuePtr;
|
} EventQueueRec, *EventQueuePtr;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned short id_vendor;
|
struct libevdev *dev;
|
||||||
unsigned short id_product;
|
|
||||||
|
|
||||||
char *device;
|
char *device;
|
||||||
int grabDevice; /* grab the event device? */
|
int grabDevice; /* grab the event device? */
|
||||||
@@ -220,6 +221,11 @@ typedef struct {
|
|||||||
Time expires; /* time of expiry */
|
Time expires; /* time of expiry */
|
||||||
Time timeout;
|
Time timeout;
|
||||||
} emulateWheel;
|
} emulateWheel;
|
||||||
|
struct {
|
||||||
|
int vert_delta;
|
||||||
|
int horiz_delta;
|
||||||
|
int dial_delta;
|
||||||
|
} smoothScroll;
|
||||||
/* run-time calibration */
|
/* run-time calibration */
|
||||||
struct {
|
struct {
|
||||||
int min_x;
|
int min_x;
|
||||||
@@ -234,13 +240,6 @@ typedef struct {
|
|||||||
int reopen_left; /* number of attempts left to re-open the device */
|
int reopen_left; /* number of attempts left to re-open the device */
|
||||||
OsTimerPtr reopen_timer;
|
OsTimerPtr reopen_timer;
|
||||||
|
|
||||||
/* Cached info from device. */
|
|
||||||
unsigned long bitmask[NLONGS(EV_CNT)];
|
|
||||||
unsigned long key_bitmask[NLONGS(KEY_CNT)];
|
|
||||||
unsigned long rel_bitmask[NLONGS(REL_CNT)];
|
|
||||||
unsigned long abs_bitmask[NLONGS(ABS_CNT)];
|
|
||||||
struct input_absinfo absinfo[ABS_CNT];
|
|
||||||
|
|
||||||
/* minor/major number */
|
/* minor/major number */
|
||||||
dev_t min_maj;
|
dev_t min_maj;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user