From 299de21b2ab3cfa2078823215f84da67e7b3d1a3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 9 Dec 2009 13:59:57 +1000 Subject: Initialize extension with the right number of events. If the server supports a lower XI version than the client, the Xlib-internal event vector may be smashed. See libXext for more details. http://cgit.freedesktop.org/xorg/lib/libXext/commit/?id=83fdb27df4ddc2fb088ddf2ec65f0db6b7c57287 This patch queries the server for the supported XI extension before registering the extension with Xlib. The number of events registered depends on the server version. Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau --- src/XIint.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/XIint.h') diff --git a/src/XIint.h b/src/XIint.h index 400c920..00e84d3 100644 --- a/src/XIint.h +++ b/src/XIint.h @@ -14,6 +14,7 @@ extern XExtDisplayInfo *XInput_find_display(Display *); extern int _XiCheckExtInit(Display *, int, XExtDisplayInfo *); extern XExtensionVersion *_XiGetExtensionVersion(Display *, _Xconst char *, XExtDisplayInfo *); +extern XExtensionVersion* _XiGetExtensionVersionRequest(Display *dpy, _Xconst char *name, int xi_opcode); extern Status _xiQueryVersion(Display *dpy, int*, int*, XExtDisplayInfo *); extern Status _XiEventToWire( -- cgit v1.2.3