merge X.Org git HEAD to get XINPUT ABI version 7 support.

This commit is contained in:
matthieu 2010-06-13 11:10:57 +00:00
parent 538c7a2f5f
commit 8f3e4f02d9
4 changed files with 70 additions and 38 deletions

View File

@ -1,12 +1,28 @@
This is a stub file. This package has not yet had its complete licensing
information compiled. Please see the individual source files for details on
your rights to use and modify this software.
Copyright 1995, 1999 by Patrick Lecoanet, France. <lecoanet@cena.dgac.fr>
Copyright 2002, Red Hat <alan@redhat.com>
Please submit updated COPYING files to the Xorg bugzilla:
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of Patrick Lecoanet not be used in
advertising or publicity pertaining to distribution of the software without
specific, written prior permission. The Authors make no
representations about the suitability of this software for any purpose. It
is provided "as is" without express or implied warranty.
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
PATRICK LECOANET DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL PATRICK LECOANET BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
All licensing questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

View File

@ -1,20 +1,25 @@
xf86-input-fpit - Fujitsu Stylistic Tablet PC input driver for the Xorg X server
Please submit bugs & patches to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
Please submit bug reports to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/driver/xf86-input-fpit
http://cgit.freedesktop.org/xorg/driver/xf86-input-fpit
For patch submission instructions, see:
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage

View File

@ -45,24 +45,6 @@ XORG_CWARNFLAGS
AH_TOP([#include "xorg-server.h"])
#AC_DEFINE(XFree86LOADER,1,[Stub define for loadable drivers])
#
#AC_ARG_ENABLE(XINPUT, AS_HELP_STRING([--enable-xinput],
# [Build XInput support (default: yes)]),
# [XINPUT=$enableval],[XINPUT=yes])
#AM_CONDITIONAL(XINPUT, test "x$XINPUT" = "xyes")
#if test "x$XINPUT" = "xyes" ; then
# AC_DEFINE(XINPUT,1,[Enable XInput support])
#fi
#
#AC_ARG_ENABLE(XKB, AS_HELP_STRING([--enable-xkb],
# [Build XKB support (default: yes)]),
# [XKB=$enableval],[XKB=yes])
#AM_CONDITIONAL(XKB, test "x$XKB" = "xyes")
#if test "x$XKB" = "xyes" ; then
# AC_DEFINE(XKB,1,[Enable XKB support])
#fi
AC_ARG_WITH(xorg-module-dir,
AC_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),

View File

@ -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->fpitMinX, priv->fpitMaxX, 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
@ -559,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);
}