diff options
author | Peter Hutterer <peter.hutterer@redhat.com> | 2008-09-04 18:22:56 +0930 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-09-04 18:22:56 +0930 |
commit | 4509ec1daf8a03b261c1fa8aa48b5def3f336aed (patch) | |
tree | 091ba3940419146578492cd6639000b951254283 | |
parent | a205dfc091e6d7c67e3fa1421fe8a43f5ed40b00 (diff) |
Use HAVE_PROPERTIES define instead of GET_ABI_MAJOR for property compilation.
-rw-r--r-- | src/draglock.c | 4 | ||||
-rw-r--r-- | src/emuMB.c | 6 | ||||
-rw-r--r-- | src/emuWheel.c | 6 | ||||
-rw-r--r-- | src/evdev.c | 8 | ||||
-rw-r--r-- | src/evdev.h | 7 |
5 files changed, 18 insertions, 13 deletions
diff --git a/src/draglock.c b/src/draglock.c index 9ec78ab..f21ca4c 100644 --- a/src/draglock.c +++ b/src/draglock.c @@ -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. */ diff --git a/src/emuMB.c b/src/emuMB.c index 5cb69e1..e805a23 100644 --- a/src/emuMB.c +++ b/src/emuMB.c @@ -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. */ diff --git a/src/emuWheel.c b/src/emuWheel.c index a436c49..e503aaa 100644 --- a/src/emuWheel.c +++ b/src/emuWheel.c @@ -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) { diff --git a/src/evdev.c b/src/evdev.c index 2c071fa..f4efd74 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -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 */ diff --git a/src/evdev.h b/src/evdev.h index 80756ac..6c59dad 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -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); |