rpms/xorg-x11-drv-acecad/devel acecad-1.3.0-abi.patch, NONE, 1.1 xorg-x11-drv-acecad.spec, 1.19, 1.20
Peter Hutterer
whot at fedoraproject.org
Thu Jul 16 07:12:23 UTC 2009
- Previous message (by thread): rpms/xorg-x11-drv-aiptek/devel aiptek-1.2.0-abi.patch, NONE, 1.1 xorg-x11-drv-aiptek.spec, 1.19, 1.20
- Next message (by thread): rpms/python-repoze-who-plugins-sa/devel import.log, NONE, 1.1 python-repoze-who-plugins-sa.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: whot
Update of /cvs/pkgs/rpms/xorg-x11-drv-acecad/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19024
Modified Files:
xorg-x11-drv-acecad.spec
Added Files:
acecad-1.3.0-abi.patch
Log Message:
* Thu Jul 16 2009 Peter Hutterer <peter.hutterer at redhat.com> 1.3.0-2
- acecad-1.3.0-abi.patch: cope with XINPUT ABI 7.
acecad-1.3.0-abi.patch:
--- NEW FILE acecad-1.3.0-abi.patch ---
>From a87f59f431c86272e45fdc3ed328fd30be1db2ae Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon, 22 Jun 2009 13:36:54 +1000
Subject: [PATCH] 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 <peter.hutterer at who-t.net>
---
src/acecad.c | 46 +++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 43 insertions(+), 3 deletions(-)
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 */
--
1.6.3.rc1.2.g0164.dirty
Index: xorg-x11-drv-acecad.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-acecad/devel/xorg-x11-drv-acecad.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- xorg-x11-drv-acecad.spec 15 Jul 2009 15:44:32 -0000 1.19
+++ xorg-x11-drv-acecad.spec 16 Jul 2009 07:12:22 -0000 1.20
@@ -5,7 +5,7 @@
Summary: Xorg X11 acecad input driver
Name: xorg-x11-drv-acecad
Version: 1.3.0
-Release: 1%{?dist}.1
+Release: 2%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -13,6 +13,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version
Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
+Patch1: acecad-1.3.0-abi.patch
+
ExcludeArch: s390 s390x
BuildRequires: xorg-x11-server-sdk >= 1.3.0.0-6
@@ -23,6 +25,7 @@ X.Org X11 acecad input driver.
%prep
%setup -q -n %{tarball}-%{version}
+%patch1 -p1
%build
%configure --disable-static
@@ -45,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man4/acecad.4*
%changelog
+* Thu Jul 16 2009 Peter Hutterer <peter.hutterer at redhat.com> 1.3.0-2
+- acecad-1.3.0-abi.patch: cope with XINPUT ABI 7.
+
* Wed Jul 15 2009 Adam Jackson <ajax at redhat.com> - 1.3.0-1.1
- ABI bump
- Previous message (by thread): rpms/xorg-x11-drv-aiptek/devel aiptek-1.2.0-abi.patch, NONE, 1.1 xorg-x11-drv-aiptek.spec, 1.19, 1.20
- Next message (by thread): rpms/python-repoze-who-plugins-sa/devel import.log, NONE, 1.1 python-repoze-who-plugins-sa.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list