Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=xorgtesting.git;a=commitdiff;h=ec8ad9a936074b936a470dd1a175c8482df92bb6
commit ec8ad9a936074b936a470dd1a175c8482df92bb6 Author: bouleetbil <[email protected]> Date: Wed Sep 2 16:21:54 2009 +0200 xf86-input-acecad-1.3.0-2-i686 *rebuild with xorg diff --git a/source/x11/xf86-input-acecad/FixABI-Xinput.diff b/source/x11/xf86-input-acecad/FixABI-Xinput.diff new file mode 100644 index 0000000..c01f76b --- /dev/null +++ b/source/x11/xf86-input-acecad/FixABI-Xinput.diff @@ -0,0 +1,109 @@ +From a87f59f431c86272e45fdc3ed328fd30be1db2ae Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <[email protected]> +Date: Mon, 22 Jun 2009 03:36:54 +0000 +Subject: Cope with ABI_XINPUT_VERSION 7 - requires button/axes labels. + +We don't have an atom for relative pressure, so if the device is set to +relative, we export the axis as REL_Z instead. + +Signed-off-by: Peter Hutterer <[email protected]> +--- +diff --git a/src/acecad.c b/src/acecad.c +index 63c5aaf..1dac489 100644 +--- a/src/acecad.c ++++ b/src/acecad.c +@@ -78,6 +78,11 @@ + #endif + #endif + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++#include <X11/Xatom.h> ++#include <xserver-properties.h> ++#endif ++ + /* Previously found in xf86Xinput.h */ + #ifdef DBG + #undef DBG +@@ -627,13 +632,36 @@ DeviceInit (DeviceIntPtr dev) + int rx, ry; + LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; + AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private); +- unsigned char map[] = +- {0, 1, 2, 3}; ++ unsigned char map[] = {0, 1, 2, 3}; ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ Atom btn_labels[3]; ++ Atom axes_labels[3]; ++ ++ btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); ++ btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); ++ btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); ++ ++ if ((priv->flags & ABSOLUTE_FLAG)) ++ { ++ axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X); ++ axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y); ++ axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE); ++ } else ++ { ++ axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); ++ axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); ++ axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Z); ++ } ++#endif + + xf86MsgVerb(X_INFO, 4, "%s Init\n", local->name); + + /* 3 boutons */ +- if (InitButtonClassDeviceStruct (dev, 3, map) == FALSE) ++ if (InitButtonClassDeviceStruct (dev, 3, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ btn_labels, ++#endif ++ map) == FALSE) + { + xf86Msg(X_ERROR, "%s: unable to allocate ButtonClassDeviceStruct\n", local->name); + return !Success; +@@ -653,6 +681,9 @@ DeviceInit (DeviceIntPtr dev) + + /* 3 axes */ + if (InitValuatorClassDeviceStruct (dev, 3, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ axes_labels, ++#endif + #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 + xf86GetMotionEvents, + #endif +@@ -668,6 +699,9 @@ DeviceInit (DeviceIntPtr dev) + + InitValuatorAxisStruct(dev, + 0, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ axes_labels[0], ++#endif + 0, /* min val */ + #if XORG_BOTCHED_INPUT + screenInfo.screens[0]->width, +@@ -679,6 +713,9 @@ DeviceInit (DeviceIntPtr dev) + 1000); /* max_res */ + InitValuatorAxisStruct(dev, + 1, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ axes_labels[1], ++#endif + 0, /* min val */ + #if XORG_BOTCHED_INPUT + screenInfo.screens[0]->height, +@@ -690,6 +727,9 @@ DeviceInit (DeviceIntPtr dev) + 1000); /* max_res */ + InitValuatorAxisStruct(dev, + 2, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ axes_labels[2], ++#endif + 0, /* min val */ + priv->acecadMaxZ, /* max val */ + 1000, /* resolution */ +-- +cgit v0.8.2 + diff --git a/source/x11/xf86-input-acecad/FrugalBuild b/source/x11/xf86-input-acecad/FrugalBuild index 5591013..a7c4c88 100644 --- a/source/x11/xf86-input-acecad/FrugalBuild +++ b/source/x11/xf86-input-acecad/FrugalBuild @@ -3,7 +3,10 @@ pkgname=xf86-input-acecad pkgver=1.3.0 -pkgrel=1 +pkgrel=2 Finclude xorg -sha1sums=('4d354701cc43ac71388d389a16e61d8378aed0c5') +source=($source FixABI-Xinput.diff) +sha1sums=('4d354701cc43ac71388d389a16e61d8378aed0c5' \ + 'ad88a998400d92ef7ee3fd19cda9426e7a6cc664') + # optimization OK _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
