Hi Peter,

Sorry for replying off-list first.

Thanks for the work you've put into this.  I haven't spent a lot of time
 testing the new code, but here are my first impressions.  You're
probably aware of most of the issues below already, but I'll mention
them just in case.

* The biggest issue for me right now is reporting of XI1 (see the
attached test program).  XSelectExtensionEvents and
XGrabDevice/XGrabDeviceButton will only report press events; motion and
release events are lost.

* A driver sending a proximity event crashes the server.

* XIGrabButton always fails with a BadDevice error.

* It seems to be pretty easy to crash the server using XI1 applications.
 I'll provide more information later

* libXi doens't support parallel builds (make -j2) anymore.

I haven't played with XI2 code a lot yet, but the interface seems a lot
nicer than XI1 so far.  I can't think of any features that are missing
right now except for button grabs and XTest support.

Thanks,
Tom

Peter Hutterer wrote:
> This is a pull warning for XI2 into master.
> 
> Next Thursday, Jun 4, I will pull XI2 into master. I will spend the rest of
> this week ironing out issues so that the merge will be smooth. There will be
> another warning email following the merge.
> 
> In the meantime, please test the xi2 branches from
> git://people.freedesktop.org/~whot/xserver.git
> git://people.freedesktop.org/~whot/inputproto.git
> git://people.freedesktop.org/~whot/libXi.git


#include <X11/Xlib.h>
#include <X11/extensions/XInput.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char *argv[]) {
	Display *dpy = XOpenDisplay(NULL);
	XDevice *dev = NULL;
	{
		int i, n;
		XDeviceInfo *devs = XListInputDevices(dpy, &n);
		if (!devs)
			exit(EXIT_FAILURE);
		for (i = 0; i < n; i++) {
			if (strcmp(devs[i].name, "Wacom Serial Tablet PC Pen Tablet/Digitizer"))
				continue;
			dev = XOpenDevice(dpy, devs[i].id);
			break;
		}
		if (!dev)
			exit(EXIT_FAILURE);
		XFreeDeviceList(devs);
	}
	Window root = DefaultRootWindow(dpy);
	Window window = XCreateSimpleWindow(dpy, root, 0, 0, 800, 800, 0, 0, 0);
	XMapWindow(dpy, window);
	XEventClass events[4];
	int press, release, dummy, motion;
	DeviceButtonPress(dev, press, events[0]);
	DeviceButtonRelease(dev, release, events[1]);
	DeviceButtonMotion(dev, dummy, events[2]);
	DeviceMotionNotify(dev, motion, events[3]);

	XSelectExtensionEvent(dpy, window, events, 3);
	while (1) {
		XEvent ev;
		XNextEvent(dpy, &ev);
		if (ev.type == press) {
			printf("press\n");
		} else if (ev.type == release) {
			printf("release\n");
		} else if (ev.type == motion) {
			printf("motion\n");
		}
	}
}

_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to