[PATCH (v5) evdev 2/4] Add experimental XI 2.1 multitouch support

Cyril Brulebois kibi at debian.org
Sun Jan 23 15:38:14 PST 2011


Daniel Stone <daniel at fooishbar.org> (19/01/2011):
> From: Chase Douglas <chase.douglas at canonical.com>
> 
> This multitouch addition only supports slotted MT evdev protocol
> devices. Support must be enabled at configure time using
> --enable-multitouch.
> 
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>

I think you're missing a few bits here:
| --- a/configure.ac
| +++ b/configure.ac
| @@ -45,7 +45,7 @@ XORG_MACROS_VERSION(1.8)
|  XORG_DEFAULT_OPTIONS
|  
|  # Obtain compiler/linker options from server and required extensions
| -PKG_CHECK_MODULES(XORG, xorg-server xproto inputproto)
| +PKG_CHECK_MODULES(XORG, xorg-server xproto [inputproto >= 2.0.99.1])
|  # Whether to include support for experimental XI 2.1 multitouch
|  AC_ARG_ENABLE(multitouch,

If you want to get multitouch enabled w/o an option (see Peter's
mail), you may want to require a multitouch-enabled input proto.
Requiring it unconditionally shouldn't put a heavy strain on
distributors.

| --- a/src/evdev.c
| +++ b/src/evdev.c
| @@ -35,6 +35,7 @@
|  
|  #include <X11/keysym.h>
|  #include <X11/extensions/XI.h>
| +#include <X11/extensions/XI2.h>
|  
|  #include <linux/version.h>
|  #include <sys/stat.h>

You need this for some defines, like XI_TouchEnd:
|   CC     evdev.lo
| evdev.c: In function ‘EvdevProcessTouch’:
| evdev.c:653: error: ‘XI_TouchEnd’ undeclared (first use in this function)

This issue can be seen by setting --enable-multitouch with inputproto
2.0.99.1 installed.

Need to check the xi minor version in the server as well:
| evdev.c: In function ‘EvdevPostQueuedEvents’:
| evdev.c:862: warning: implicit declaration of function ‘xf86PostTouchEvent’
| evdev.c:862: warning: nested extern declaration of ‘xf86PostTouchEvent’

Something like this should do:
| #if SERVER_XI_MINOR_VERSION < 1
| #error You need SERVER_XI_MINOR_VERSION 1 or higher to get multitouch support
| /* Or decide here whether to disable multitouch. */
| #endif

KiBi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110124/c319beaf/attachment.pgp>


More information about the xorg-devel mailing list