mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-25 02:09:22 +00:00
Use HAVE_PROPERTIES define instead of GET_ABI_MAJOR for property compilation.
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "evdev.h"
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
static const char *propname_dlock = "Drag Lock Buttons";
|
||||
|
||||
static Atom prop_dlock = 0; /* Drag lock buttons. */
|
||||
@@ -209,7 +209,7 @@ EvdevDragLockFilterEvent(InputInfoPtr pInfo, unsigned int button, int value)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
/**
|
||||
* Initialise property for drag lock buttons setting.
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,7 @@ enum {
|
||||
MBEMU_AUTO
|
||||
};
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
static const char *propname_mbemu = "Middle Button Emulation";
|
||||
static const char *propname_mbtimeout = "Middle Button Timeout";
|
||||
|
||||
@@ -324,7 +324,7 @@ EvdevMBEmuPreInit(InputInfoPtr pInfo)
|
||||
EvdevMBEmuWakeupHandler,
|
||||
(pointer)pInfo);
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
XIChangeDeviceProperty(pInfo->dev, prop_mbemu, XA_INTEGER, 8,
|
||||
PropModeReplace, 1, &pEvdev->emulateMB.enabled,
|
||||
TRUE, FALSE, FALSE);
|
||||
@@ -353,7 +353,7 @@ EvdevMBEmuEnable(InputInfoPtr pInfo, BOOL enable)
|
||||
}
|
||||
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
/**
|
||||
* Initialise property for MB emulation on/off.
|
||||
*/
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#define WHEEL_NOT_CONFIGURED 0
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
static const char *propname_wheel_emu = "Wheel Emulation";
|
||||
static const char *propname_wheel_xmap = "Wheel Emulation X Axis";
|
||||
static const char *propname_wheel_ymap = "Wheel Emulation Y Axis";
|
||||
@@ -316,7 +316,7 @@ EvdevWheelEmuPreInit(InputInfoPtr pInfo)
|
||||
"EmulateWheelTimeout: %d\n",
|
||||
pInfo->name, pEvdev->emulateWheel.button, inertia, timeout);
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
XIChangeDeviceProperty(pInfo->dev, prop_wheel_emu, XA_INTEGER, 8,
|
||||
PropModeReplace, 1, &pEvdev->emulateWheel.enabled,
|
||||
TRUE, FALSE, FALSE);
|
||||
@@ -348,7 +348,7 @@ EvdevWheelEmuPreInit(InputInfoPtr pInfo)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
void
|
||||
EvdevWheelEmuInitProperty(DeviceIntPtr dev)
|
||||
{
|
||||
|
||||
@@ -96,7 +96,7 @@ static const char *evdevDefaults[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
typedef struct _PropHandler {
|
||||
void (*init)(DeviceIntPtr dev);
|
||||
BOOL (*handle)(DeviceIntPtr dev, Atom prop, XIPropertyValuePtr val);
|
||||
@@ -170,7 +170,7 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
|
||||
xf86PostKeyboardEvent(pInfo->dev, code, value);
|
||||
}
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
static Bool
|
||||
EvdevSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr val)
|
||||
{
|
||||
@@ -878,7 +878,7 @@ EvdevInitButtonMapping(InputInfoPtr pInfo)
|
||||
}
|
||||
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
static void
|
||||
EvdevInitProperties(DeviceIntPtr device)
|
||||
{
|
||||
@@ -922,7 +922,7 @@ EvdevInit(DeviceIntPtr device)
|
||||
else if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)
|
||||
EvdevAddAbsClass(device);
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
/* We drop the return value, the only time we ever want the handlers to
|
||||
* unregister is when the device dies. In which case we don't have to
|
||||
* unregister anyway */
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
|
||||
#define EVDEV_MAXBUTTONS 32
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#define HAVE_PROPERTIES 1
|
||||
#endif
|
||||
|
||||
|
||||
/* axis specific data for wheel emulation */
|
||||
typedef struct {
|
||||
int up_button;
|
||||
@@ -108,7 +113,7 @@ void EvdevMBEmuEnable(InputInfoPtr, BOOL);
|
||||
|
||||
unsigned int EvdevUtilButtonEventToButtonNumber(int code);
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
|
||||
#ifdef HAVE_PROPERTIES
|
||||
void EvdevMBEmuInitProperty(DeviceIntPtr);
|
||||
BOOL EvdevMBEmuSetProperty(DeviceIntPtr, Atom, XIPropertyValuePtr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user