Commit a2494e6f authored by Alan Coopersmith's avatar Alan Coopersmith

Raise bar for xorg-server to 1.7 for XINPUT ABI 7

Not all of the button label settings were wrapped in ABI #ifdefs,
so just drop all #ifdefs for GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston Sequoia <jeremyhu@apple.com>
parent 88e90dde
......@@ -46,7 +46,7 @@ XORG_DEFAULT_OPTIONS
XORG_WITH_LINT
# Obtain compiler/linker options from server and required extensions
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.5.99.901] xproto inputproto)
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7] xproto inputproto)
# Define a configure option for an alternate input module directory
AC_ARG_WITH(xorg-module-dir,
......
......@@ -1673,10 +1673,8 @@ MouseProc(DeviceIntPtr device, int what)
mousePrivPtr mPriv;
unsigned char map[MSE_MAXBUTTONS + 1];
int i;
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
Atom btn_labels[MSE_MAXBUTTONS] = {0};
Atom axes_labels[2] = { 0, 0 };
#endif
pInfo = device->public.devicePrivate;
pMse = pInfo->private;
......@@ -1693,29 +1691,21 @@ MouseProc(DeviceIntPtr device, int what)
for (i = 0; i < MSE_MAXBUTTONS; i++)
map[i + 1] = i + 1;
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
MouseInitButtonLabels(btn_labels);
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
#endif
InitPointerDeviceStruct((DevicePtr)device, map,
min(pMse->buttons, MSE_MAXBUTTONS),
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
btn_labels,
#endif
pMse->Ctrl,
GetMotionHistorySize(), 2
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
, axes_labels
#endif
GetMotionHistorySize(), 2,
axes_labels
);
/* X valuator */
xf86InitValuatorAxisStruct(device, 0,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
axes_labels[0],
#endif
-1, -1, 1, 0, 1
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
, Relative
......@@ -1724,9 +1714,7 @@ MouseProc(DeviceIntPtr device, int what)
xf86InitValuatorDefaults(device, 0);
/* Y valuator */
xf86InitValuatorAxisStruct(device, 1,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
axes_labels[1],
#endif
-1, -1, 1, 0, 1
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
, Relative
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment