@ -1,111 +0,0 @@ |
|||
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
# |
|||
# Filename: package/.../xf86-input-fpit/0001-Cope-with-XINPUT-ABI-7.patch |
|||
# Copyright (C) 2010 The OpenSDE Project |
|||
# |
|||
# More information can be found in the files COPYING and README. |
|||
# |
|||
# This patch file is dual-licensed. It is available under the license the |
|||
# patched project is licensed under, as long as it is an OpenSource license |
|||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|||
# of the GNU General Public License as published by the Free Software |
|||
# Foundation; either version 2 of the License, or (at your option) any later |
|||
# version. |
|||
# --- SDE-COPYRIGHT-NOTE-END --- |
|||
|
|||
From ae95bf640db6c171609e6937bcd60fa710ce23ad Mon Sep 17 00:00:00 2001 |
|||
From: Peter Hutterer <peter.hutterer@who-t.net> |
|||
Date: Fri, 17 Jul 2009 14:38:31 +1000 |
|||
Subject: [PATCH 1/3] Cope with XINPUT ABI 7. |
|||
|
|||
---
|
|||
src/xf86Fpit.c | 40 +++++++++++++++++++++++++++++++++++----- |
|||
1 files changed, 35 insertions(+), 5 deletions(-) |
|||
|
|||
diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c
|
|||
index 528ebb9..f40c6a9 100644
|
|||
--- a/src/xf86Fpit.c
|
|||
+++ b/src/xf86Fpit.c
|
|||
@@ -188,6 +188,9 @@ static void xf86FpitSetUpAxes(DeviceIntPtr dev, FpitPrivatePtr priv)
|
|||
* screen to fit one meter. |
|||
*/ |
|||
int quarter_turns; |
|||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
|||
+ Atom axis_labels[2] = { 0, 0 };
|
|||
+#endif
|
|||
|
|||
priv->screen_width = screenInfo.screens[priv->screen_no]->width; |
|||
priv->screen_height = screenInfo.screens[priv->screen_no]->height; |
|||
@@ -212,14 +215,30 @@ static void xf86FpitSetUpAxes(DeviceIntPtr dev, FpitPrivatePtr priv)
|
|||
} |
|||
|
|||
if (priv->fpitTotalOrientation & FPIT_THEN_SWAP_XY) { |
|||
- InitValuatorAxisStruct(dev, 1, priv->fpitMinX, priv->fpitMaxX, 9500, 0 /* min_res */ ,
|
|||
+ InitValuatorAxisStruct(dev, 1,
|
|||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
|||
+ axis_labels[1],
|
|||
+#endif
|
|||
+ priv->fpitMinX, priv->fpitMaxX, 9500, 0 /* min_res */ ,
|
|||
9500 /* max_res */ ); |
|||
- InitValuatorAxisStruct(dev, 0, priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ ,
|
|||
+ InitValuatorAxisStruct(dev, 0,
|
|||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
|||
+ axis_labels[0],
|
|||
+#endif
|
|||
+ priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ ,
|
|||
10500 /* max_res */ ); |
|||
} else { |
|||
- InitValuatorAxisStruct(dev, 0, priv->fpitMinX, priv->fpitMaxX, 9500, 0 /* min_res */ ,
|
|||
+ InitValuatorAxisStruct(dev, 0,
|
|||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
|||
+ axis_labels[0],
|
|||
+#endif
|
|||
+ priv->fpitMinY, priv->fpitMaxY, 9500, 0 /* min_res */ ,
|
|||
9500 /* max_res */ ); |
|||
- InitValuatorAxisStruct(dev, 1, priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ ,
|
|||
+ InitValuatorAxisStruct(dev, 1,
|
|||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
|||
+ axis_labels[1],
|
|||
+#endif
|
|||
+ priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ ,
|
|||
10500 /* max_res */ ); |
|||
} |
|||
} |
|||
@@ -408,6 +427,10 @@ static Bool xf86FpitControl(DeviceIntPtr dev, int mode)
|
|||
unsigned char map[] = { |
|||
0, 1, 2, 3 /* DMC: changed this so we can use all three buttons */ |
|||
}; |
|||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
|||
+ Atom btn_labels[3] = { 0 };
|
|||
+ Atom axis_labels[2] = { 0, 0 };
|
|||
+#endif
|
|||
|
|||
|
|||
switch (mode) { |
|||
@@ -420,7 +443,11 @@ static Bool xf86FpitControl(DeviceIntPtr dev, int mode)
|
|||
/* |
|||
* Device reports button press for up to 3 buttons. |
|||
*/ |
|||
- if (InitButtonClassDeviceStruct(dev, 3, map) == FALSE) {
|
|||
+ if (InitButtonClassDeviceStruct(dev, 3,
|
|||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
|||
+ btn_labels,
|
|||
+#endif
|
|||
+ map) == FALSE) {
|
|||
ErrorF("Unable to allocate Fpit touchscreen ButtonClassDeviceStruct\n"); |
|||
return !Success; |
|||
} |
|||
@@ -435,6 +462,9 @@ static Bool xf86FpitControl(DeviceIntPtr dev, int mode)
|
|||
} |
|||
|
|||
if (InitValuatorClassDeviceStruct(dev, 2, |
|||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
|
|||
+ axis_labels,
|
|||
+#endif
|
|||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 |
|||
xf86GetMotionEvents, |
|||
#endif |
|||
--
|
|||
1.6.5.3 |
|||
|
@ -1,50 +0,0 @@ |
|||
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
# |
|||
# Filename: package/.../xf86-input-fpit/0002-Fix-module-unloading.patch |
|||
# Copyright (C) 2010 The OpenSDE Project |
|||
# |
|||
# More information can be found in the files COPYING and README. |
|||
# |
|||
# This patch file is dual-licensed. It is available under the license the |
|||
# patched project is licensed under, as long as it is an OpenSource license |
|||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|||
# of the GNU General Public License as published by the Free Software |
|||
# Foundation; either version 2 of the License, or (at your option) any later |
|||
# version. |
|||
# --- SDE-COPYRIGHT-NOTE-END --- |
|||
|
|||
From d8e6b7594dcf9bb622693be471939a0918e1f320 Mon Sep 17 00:00:00 2001 |
|||
From: Peter Hutterer <peter.hutterer@who-t.net> |
|||
Date: Fri, 28 Aug 2009 08:16:36 +1000 |
|||
Subject: [PATCH 2/3] Fix module unloading. |
|||
|
|||
After calling xfree(priv), local->private must be set NULL. |
|||
Otherwise the server tries to free it again during xf86DeleteInput. |
|||
|
|||
local->name must not be freed, it is set to XI_TOUCHSCREEN during PreInit. |
|||
|
|||
local must not be freed, we pass it into xf86DeleteInput. |
|||
|
|||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> |
|||
---
|
|||
src/xf86Fpit.c | 3 +-- |
|||
1 files changed, 1 insertions(+), 2 deletions(-) |
|||
|
|||
diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c
|
|||
index f40c6a9..ce7540b 100644
|
|||
--- a/src/xf86Fpit.c
|
|||
+++ b/src/xf86Fpit.c
|
|||
@@ -589,8 +589,7 @@ static void xf86FpitUninit(InputDriverPtr drv, LocalDevicePtr local, int flags)
|
|||
xf86FpitControl(local->dev, DEVICE_OFF); |
|||
xfree(priv->fpitDev); |
|||
xfree(priv); |
|||
- xfree(local->name);
|
|||
- xfree(local);
|
|||
+ local->private = NULL;
|
|||
xf86DeleteInput(local, 0); |
|||
} |
|||
|
|||
--
|
|||
1.6.5.3 |
|||
|
@ -1,46 +0,0 @@ |
|||
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
# |
|||
# Filename: package/.../xf86-input-fpit/0003-fpit-minX-maxX-get-wrongly-initialized.patch |
|||
# Copyright (C) 2010 The OpenSDE Project |
|||
# |
|||
# More information can be found in the files COPYING and README. |
|||
# |
|||
# This patch file is dual-licensed. It is available under the license the |
|||
# patched project is licensed under, as long as it is an OpenSource license |
|||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|||
# of the GNU General Public License as published by the Free Software |
|||
# Foundation; either version 2 of the License, or (at your option) any later |
|||
# version. |
|||
# --- SDE-COPYRIGHT-NOTE-END --- |
|||
|
|||
From d5f2ccda167ee783e6fd8eaff31a1e16013a1585 Mon Sep 17 00:00:00 2001 |
|||
From: philip <feucht@uni-koblenz.de> |
|||
Date: Wed, 19 May 2010 12:37:05 +0200 |
|||
Subject: [PATCH 3/3] fpit: minX/ maxX get wrongly initialized |
|||
|
|||
maxX/ minX get values from maxY/ minY |
|||
Problem introduced in commit 7d203627e7e3e7a6f8d0e847ed650b0b89760c09 |
|||
|
|||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca> |
|||
Signed-off-by: philip <feucht@uni-koblenz.de> |
|||
---
|
|||
src/xf86Fpit.c | 2 +- |
|||
1 files changed, 1 insertions(+), 1 deletions(-) |
|||
|
|||
diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c
|
|||
index ce7540b..4c09c96 100644
|
|||
--- a/src/xf86Fpit.c
|
|||
+++ b/src/xf86Fpit.c
|
|||
@@ -232,7 +232,7 @@ static void xf86FpitSetUpAxes(DeviceIntPtr dev, FpitPrivatePtr priv)
|
|||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 |
|||
axis_labels[0], |
|||
#endif |
|||
- priv->fpitMinY, priv->fpitMaxY, 9500, 0 /* min_res */ ,
|
|||
+ priv->fpitMinX, priv->fpitMaxX, 9500, 0 /* min_res */ ,
|
|||
9500 /* max_res */ ); |
|||
InitValuatorAxisStruct(dev, 1, |
|||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 |
|||
--
|
|||
1.6.5.3 |
|||
|