libxi: Changes to 'upstream-unstable'

2017-01-23 Thread Emilio Pozuelo Monfort
 configure.ac|2 +-
 src/XIQueryDevice.c |9 ++---
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit b87c312590877800b4e18a17a012b47839f5c06b
Author: Peter Hutterer 
Date:   Mon Jan 23 13:44:58 2017 +1000

libXi 1.7.9

Signed-off-by: Peter Hutterer 

diff --git a/configure.ac b/configure.ac
index 3b84c74..69c9ef4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.7.8],
+AC_INIT([libXi], [1.7.9],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 557b60798a9da49386f1034b133838332735de22
Author: Emilio Pozuelo Monfort 
Date:   Tue Dec 27 17:24:10 2016 +0100

Fix possible free of uninitialized pointer

If the _XReply() call fails, we'll try to free an uninitialized
pointer.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849026

Reported-by: Thomas Walker 
Signed-off-by: Emilio Pozuelo Monfort 
Reviewed-by: Julien Cristau 
Tested-by: Thomas Walker 
Signed-off-by: Julien Cristau 

diff --git a/src/XIQueryDevice.c b/src/XIQueryDevice.c
index a877d78..51e2d0d 100644
--- a/src/XIQueryDevice.c
+++ b/src/XIQueryDevice.c
@@ -46,7 +46,7 @@ XIQueryDevice(Display *dpy, int deviceid, int 
*ndevices_return)
 char*ptr;
 char*end;
 int i;
-char*buf;
+char*buf = NULL;
 
 XExtDisplayInfo *extinfo = XInput_find_display(dpy);
 

commit 4c5c8d6246debc06a56120cff71bfdf1877884d0
Author: Emilio Pozuelo Monfort 
Date:   Tue Oct 25 21:31:19 2016 +0200

Check that allocating a buffer succeeded

Since we are going to write into the buffer, we should make sure the
allocation didn't fail.

Reported-by: Julien Cristau 
Signed-off-by: Emilio Pozuelo Monfort 
Signed-off-by: Peter Hutterer 

diff --git a/src/XIQueryDevice.c b/src/XIQueryDevice.c
index e3b0c9f..a877d78 100644
--- a/src/XIQueryDevice.c
+++ b/src/XIQueryDevice.c
@@ -66,17 +66,18 @@ XIQueryDevice(Display *dpy, int deviceid, int 
*ndevices_return)
 {
*ndevices_return = reply.num_devices;
info = Xmalloc((reply.num_devices + 1) * sizeof(XIDeviceInfo));
+   buf = Xmalloc(reply.length * 4);
 }
 else
 {
*ndevices_return = 0;
info = NULL;
+   buf = NULL;
 }
 
-if (!info)
+if (!info || !buf)
 goto error;
 
-buf = Xmalloc(reply.length * 4);
 _XRead(dpy, buf, reply.length * 4);
 ptr = buf;
 end = buf + reply.length * 4;
@@ -135,9 +136,9 @@ error_loop:
 Xfree(info[i].name);
 Xfree(info[i].classes);
 }
+error:
 Xfree(info);
 Xfree(buf);
-error:
 UnlockDisplay(dpy);
 error_unlocked:
 SyncHandle();

commit 7ac03c6c1907a39b5b42b17ad331295b8c85154d
Author: Emilio Pozuelo Monfort 
Date:   Tue Oct 25 21:31:18 2016 +0200

Plug a memory leak

Introduced in commit 19a9cd6.

Reported-by: Julien Cristau 
Signed-off-by: Emilio Pozuelo Monfort 
Signed-off-by: Peter Hutterer 

diff --git a/src/XIQueryDevice.c b/src/XIQueryDevice.c
index a457cd6..e3b0c9f 100644
--- a/src/XIQueryDevice.c
+++ b/src/XIQueryDevice.c
@@ -135,6 +135,8 @@ error_loop:
 Xfree(info[i].name);
 Xfree(info[i].classes);
 }
+Xfree(info);
+Xfree(buf);
 error:
 UnlockDisplay(dpy);
 error_unlocked:



libxi: Changes to 'upstream-unstable'

2016-10-25 Thread Andreas Boll
 configure.ac  |2 +-
 man/XListInputDevices.txt |   12 ++--
 src/XListDev.c|   45 +
 3 files changed, 36 insertions(+), 23 deletions(-)

New commits:
commit 1bdeb431c3cc9eec7e12fdd29a83237f2f228865
Author: Peter Hutterer 
Date:   Tue Oct 25 12:43:44 2016 +1000

libXi 1.7.8

Signed-off-by: Peter Hutterer 

diff --git a/configure.ac b/configure.ac
index f7d322c..3b84c74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.7.7],
+AC_INIT([libXi], [1.7.8],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 43904c9c5a0f5750a03a9bd8c96ccda182eb5a9a
Author: Peter Hutterer 
Date:   Thu Oct 13 13:33:11 2016 +1000

XListInputDevices: don't touch ndevices in case of error

We used to always set *ndevices to the number of devices returned by the
server. This magically worked because we pretty much never returned an error
except on faulty server or library implementations. With 19a9cd60 we now 
have
more chances of getting an error, so the polite thing is to just leave 
*ndevices
alone when we error out.

Document it as such in the man page, just in case someone accidentally reads
it.

Signed-off-by: Peter Hutterer 
CC: Niels Ole Salscheider 
Reviewed-by: Emil Velikov 

diff --git a/man/XListInputDevices.txt b/man/XListInputDevices.txt
index 276660d..450f377 100644
--- a/man/XListInputDevices.txt
+++ b/man/XListInputDevices.txt
@@ -220,5 +220,13 @@ DESCRIPTION
Floating. If the device is a master device, attached specifies
the device ID of the master device this device is paired with.
 
-   To free the XDeviceInfo array created by XListInputDevices, use
-   XFreeDeviceList.
+RETURN VALUE
+
+
+   XListInputDevices returns a pointer to an array of XDeviceInfo
+   structs and sets ndevices_return to the number of elements in
+   that array. To free the XDeviceInfo array created by
+   XListInputDevices, use XFreeDeviceList.
+
+   On error, XListInputDevices returns NULL and ndevices_return is
+   left unmodified.
diff --git a/src/XListDev.c b/src/XListDev.c
index e4bd3d5..dda6011 100644
--- a/src/XListDev.c
+++ b/src/XListDev.c
@@ -175,7 +175,7 @@ ParseClassInfo(xAnyClassPtr *any, XAnyClassPtr *Any, int 
num_classes)
 XDeviceInfo *
 XListInputDevices(
 register Display   *dpy,
-int*ndevices)
+int*ndevices_return)
 {
 size_t s, size;
 xListInputDevicesReq *req;
@@ -190,6 +190,7 @@ XListInputDevices(
 int i;
 unsigned long rlen;
 XExtDisplayInfo *info = XInput_find_display(dpy);
+int ndevices;
 
 LockDisplay(dpy);
 if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
@@ -205,8 +206,8 @@ XListInputDevices(
return (XDeviceInfo *) NULL;
 }
 
-if ((*ndevices = rep.ndevices)) {  /* at least 1 input device */
-   size = *ndevices * sizeof(XDeviceInfo);
+if ((ndevices = rep.ndevices)) {   /* at least 1 input device */
+   size = ndevices * sizeof(XDeviceInfo);
if (rep.length < (INT_MAX >> 2)) {
rlen = rep.length << 2; /* multiply length by 4*/
slist = list = Xmalloc(rlen);
@@ -219,17 +220,17 @@ XListInputDevices(
}
_XRead(dpy, (char *)list, rlen);
 
-   any = (xAnyClassPtr) ((char *)list + (*ndevices * sizeof(xDeviceInfo)));
+   any = (xAnyClassPtr) ((char *)list + (ndevices * sizeof(xDeviceInfo)));
sav_any = any;
end = (char *)list + rlen;
-   for (i = 0; i < *ndevices; i++, list++) {
+   for (i = 0; i < ndevices; i++, list++) {
 if(SizeClassInfo(, end - (char *)any, (int)list->num_classes, 
))
 goto out;
 size += s;
}
 
Nptr = ((unsigned char *)list) + rlen;
-   for (i = 0, nptr = (unsigned char *)any; i < *ndevices; i++) {
+   for (i = 0, nptr = (unsigned char *)any; i < ndevices; i++) {
if (nptr >= Nptr)
goto out;
size += *nptr + 1;
@@ -245,10 +246,10 @@ XListInputDevices(
}
sclist = clist;
Any = (XAnyClassPtr) ((char *)clist +
- (*ndevices * sizeof(XDeviceInfo)));
+ (ndevices * sizeof(XDeviceInfo)));
list = slist;
any = sav_any;
-   for (i = 0; i < *ndevices; i++, list++, clist++) {
+   for (i = 0; i < ndevices; i++, list++, clist++) {
clist->type = list->type;
clist->id = list->id;
clist->use = list->use;
@@ -261,7 +262,7 @@ XListInputDevices(
clist = sclist;

libxi: Changes to 'upstream-unstable'

2016-10-07 Thread Andreas Boll
 configure.ac|2 +-
 src/XGMotion.c  |3 ++-
 src/XGetBMap.c  |3 ++-
 src/XGetDCtl.c  |6 --
 src/XGetFCtl.c  |7 ++-
 src/XGetKMap.c  |   14 +++---
 src/XGetMMap.c  |   11 +--
 src/XIQueryDevice.c |   36 ++--
 src/XListDev.c  |   21 +++--
 src/XOpenDev.c  |   13 ++---
 src/XQueryDv.c  |8 ++--
 11 files changed, 100 insertions(+), 24 deletions(-)

New commits:
commit 8e0476653dd134cee84f4e893f656b2f93c4e3b0
Author: Matthieu Herrb 
Date:   Tue Oct 4 21:14:01 2016 +0200

libXi 1.7.7

Signed-off-by: Matthieu Herrb 

diff --git a/configure.ac b/configure.ac
index 64033be..f7d322c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.7.6],
+AC_INIT([libXi], [1.7.7],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 19a9cd607de73947fcfb104682f203ffe4e1f4e5
Author: Tobias Stoeckmann 
Date:   Sun Sep 25 22:31:34 2016 +0200

Properly validate server responses.

By validating length fields from server responses, out of boundary
accesses and endless loops can be mitigated.

Signed-off-by: Tobias Stoeckmann 
Reviewed-by: Matthieu Herrb 

diff --git a/src/XGMotion.c b/src/XGMotion.c
index 7785843..9433e29 100644
--- a/src/XGMotion.c
+++ b/src/XGMotion.c
@@ -114,7 +114,8 @@ XGetDeviceMotionEvents(
 }
 /* rep.axes is a CARD8, so assume max number of axes for bounds check */
 if (rep.nEvents <
-   (INT_MAX / (sizeof(XDeviceTimeCoord) + (UCHAR_MAX * sizeof(int) {
+   (INT_MAX / (sizeof(XDeviceTimeCoord) + (UCHAR_MAX * sizeof(int &&
+   rep.nEvents * (rep.axes + 1) <= rep.length) {
size_t bsize = rep.nEvents *
(sizeof(XDeviceTimeCoord) + (rep.axes * sizeof(int)));
bufp = Xmalloc(bsize);
diff --git a/src/XGetBMap.c b/src/XGetBMap.c
index 002daba..13bb8c6 100644
--- a/src/XGetBMap.c
+++ b/src/XGetBMap.c
@@ -92,7 +92,8 @@ XGetDeviceButtonMapping(
 
 status = _XReply(dpy, (xReply *) & rep, 0, xFalse);
 if (status == 1) {
-   if (rep.length <= (sizeof(mapping) >> 2)) {
+   if (rep.length <= (sizeof(mapping) >> 2) &&
+   rep.nElts <= (rep.length << 2)) {
unsigned long nbytes = rep.length << 2;
_XRead(dpy, (char *)mapping, nbytes);
 
diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
index c5d3b53..7f6b396 100644
--- a/src/XGetDCtl.c
+++ b/src/XGetDCtl.c
@@ -93,7 +93,8 @@ XGetDeviceControl(
 if (rep.length > 0) {
unsigned long nbytes;
size_t size = 0;
-   if (rep.length < (INT_MAX >> 2)) {
+   if (rep.length < (INT_MAX >> 2) &&
+   (rep.length << 2) >= sizeof(xDeviceState)) {
nbytes = (unsigned long) rep.length << 2;
d = Xmalloc(nbytes);
}
@@ -117,7 +118,8 @@ XGetDeviceControl(
size_t val_size;
 
r = (xDeviceResolutionState *) d;
-   if (r->num_valuators >= (INT_MAX / (3 * sizeof(int
+   if (sizeof(xDeviceResolutionState) > nbytes ||
+   r->num_valuators >= (INT_MAX / (3 * sizeof(int
goto out;
val_size = 3 * sizeof(int) * r->num_valuators;
if ((sizeof(xDeviceResolutionState) + val_size) > nbytes)
diff --git a/src/XGetFCtl.c b/src/XGetFCtl.c
index 7fd6d0e..82dcc64 100644
--- a/src/XGetFCtl.c
+++ b/src/XGetFCtl.c
@@ -73,6 +73,7 @@ XGetFeedbackControl(
 XFeedbackState *Sav = NULL;
 xFeedbackState *f = NULL;
 xFeedbackState *sav = NULL;
+char *end = NULL;
 xGetFeedbackControlReq *req;
 xGetFeedbackControlReply rep;
 XExtDisplayInfo *info = XInput_find_display(dpy);
@@ -105,10 +106,12 @@ XGetFeedbackControl(
goto out;
}
sav = f;
+   end = (char *)f + nbytes;
_XRead(dpy, (char *)f, nbytes);
 
for (i = 0; i < *num_feedbacks; i++) {
-   if (f->length > nbytes)
+   if ((char *)f + sizeof(*f) > end ||
+   f->length == 0 || f->length > nbytes)
goto out;
nbytes -= f->length;
 
@@ -125,6 +128,8 @@ XGetFeedbackControl(
case StringFeedbackClass:
{
xStringFeedbackState *strf = (xStringFeedbackState *) f;
+   if ((char *)f + sizeof(*strf) > end)
+   goto out;
size += sizeof(XStringFeedbackState) +
(strf->num_syms_supported * sizeof(KeySym));
}
diff --git a/src/XGetKMap.c b/src/XGetKMap.c
index 0540ce4..008a72b 100644
--- a/src/XGetKMap.c
+++ b/src/XGetKMap.c
@@ -54,6 +54,7 @@ SOFTWARE.
 #include 
 #endif
 
+#include 
 #include 
 #include 
 #include 
@@ -93,9 +94,16 @@ 

libxi: Changes to 'upstream-unstable'

2016-01-24 Thread Julien Cristau
 configure.ac   |2 +-
 src/XChDProp.c |6 +++---
 src/XExtInt.c  |   16 
 3 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 2286282f965064176b3b1492646c6e2e0f4ab7dd
Author: Peter Hutterer 
Date:   Tue Dec 22 11:20:01 2015 +1000

libXi 1.7.6

Signed-off-by: Peter Hutterer 

diff --git a/configure.ac b/configure.ac
index 9b40c4d..64033be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.7.5],
+AC_INIT([libXi], [1.7.6],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 13f25bfb55f4a0bc1f614cbf9b0b13a50ecad8a0
Author: Javier Pello 
Date:   Wed Oct 7 12:41:01 2015 +0200

Fix const compiler warnings

When invoking Data, Data16 and Data32 from XChangeDeviceProperty,
we must cast the data pointer to the right type, but we do not need
to cast constness away. This change allows to enable -Wcast-qual on
the build and have it complete without warnings.

Signed-off-by: Javier Pello 
Signed-off-by: Peter Hutterer 

diff --git a/src/XChDProp.c b/src/XChDProp.c
index c863cdb..786d664 100644
--- a/src/XChDProp.c
+++ b/src/XChDProp.c
@@ -74,7 +74,7 @@ XChangeDeviceProperty(Display* dpy, XDevice* dev,
len = ((long)nelements + 3) >> 2;
if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) {
SetReqLen(req, len, len);
-   Data (dpy, (char *)data, nelements);
+   Data (dpy, (_Xconst char *)data, nelements);
} /* else force BadLength */
break;
 
@@ -83,7 +83,7 @@ XChangeDeviceProperty(Display* dpy, XDevice* dev,
if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) {
SetReqLen(req, len, len);
len = (long)nelements << 1;
-   Data16 (dpy, (short *) data, len);
+   Data16 (dpy, (_Xconst short *) data, len);
} /* else force BadLength */
break;
 
@@ -92,7 +92,7 @@ XChangeDeviceProperty(Display* dpy, XDevice* dev,
if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) {
SetReqLen(req, len, len);
len = (long)nelements << 2;
-   Data32 (dpy, (long *) data, len);
+   Data32 (dpy, (_Xconst long *) data, len);
} /* else force BadLength */
break;
 

commit 380861589690bcbe8b04b7a2c23b5dd5d10c4bf8
Author: Peter Hutterer 
Date:   Mon Oct 19 11:46:41 2015 +1000

Don't use raw serial numbers in XIEvents

cookie->serial is an Xlib contoction, provided by _XSetLastRequestRead(). 
This
serial may be different to the raw serial number from the wire protocol.
This causes issues when the raw serial is used to e.g. compare the event to
other non-XI events.

Use the cookie's serial number instead.

https://bugzilla.gnome.org/show_bug.cgi?id=756649

See also https://bugs.freedesktop.org/show_bug.cgi?id=64687

Signed-off-by: Peter Hutterer 

diff --git a/src/XExtInt.c b/src/XExtInt.c
index 672d69a..a35fcc6 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -1521,7 +1521,7 @@ wireToDeviceEvent(xXIDeviceEvent *in, 
XGenericEventCookie* cookie)
 out = next_block(_lib, sizeof(XIDeviceEvent));
 out->display = cookie->display;
 out->type = in->type;
-out->serial = in->sequenceNumber;
+out->serial = cookie->serial;
 out->extension = in->extension;
 out->evtype = in->evtype;
 out->send_event = ((in->type & 0x80) != 0);
@@ -1794,7 +1794,7 @@ wireToDeviceChangedEvent(xXIDeviceChangedEvent *in, 
XGenericEventCookie *cookie)
 cookie->data = out = malloc(sizeof(XIDeviceChangedEvent) + len);
 
 out->type = in->type;
-out->serial = in->sequenceNumber;
+out->serial = cookie->serial;
 out->display = cookie->display;
 out->extension = in->extension;
 out->evtype = in->evtype;
@@ -1827,7 +1827,7 @@ wireToHierarchyChangedEvent(xXIHierarchyEvent *in, 
XGenericEventCookie *cookie)
 out->info   = (XIHierarchyInfo*)[1];
 out->display= cookie->display;
 out->type   = in->type;
-out->serial = in->sequenceNumber;
+out->serial = cookie->serial;
 out->extension  = in->extension;
 out->evtype = in->evtype;
 out->send_event = ((in->type & 0x80) != 0);
@@ -1868,7 +1868,7 @@ wireToRawEvent(XExtDisplayInfo *info, xXIRawEvent *in, 
XGenericEventCookie *cook
 
 out = next_block(, sizeof(XIRawEvent));
 out->type   = in->type;
-out->serial = in->sequenceNumber;
+out->serial = cookie->serial;
 out->display= cookie->display;
 out->extension  = in->extension;
 out->evtype = 

libxi: Changes to 'upstream-unstable'

2015-09-14 Thread Andreas Boll
 configure.ac |2 +-
 src/XExtInt.c|2 +-
 src/XGMotion.c   |2 +-
 src/XGetCPtr.c   |2 +-
 src/XGetDCtl.c   |2 +-
 src/XGetFCtl.c   |2 +-
 src/XGetKMap.c   |2 +-
 src/XGetMMap.c   |2 +-
 src/XGetProp.c   |2 +-
 src/XGetVers.c   |   28 +++-
 src/XIAllowEvents.c  |4 ++--
 src/XIGrabDevice.c   |   11 +--
 src/XIHierarchy.c|   16 ++--
 src/XIProperties.c   |3 ++-
 src/XIQueryDevice.c  |3 ++-
 src/XIQueryVersion.c |8 ++--
 src/XISelEv.c|7 +--
 src/XIint.h  |1 -
 src/XListDProp.c |2 +-
 src/XOpenDev.c   |2 +-
 src/XQueryDv.c   |2 +-
 21 files changed, 59 insertions(+), 46 deletions(-)

New commits:
commit f180dff710dc54d00e0e26b84de053151f8f207e
Author: Peter Hutterer 
Date:   Thu Sep 10 01:16:19 2015 +1000

libXi 1.7.5

Signed-off-by: Peter Hutterer 

diff --git a/configure.ac b/configure.ac
index db70cef..9b40c4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.7.4],
+AC_INIT([libXi], [1.7.5],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 05c86e53c0bae30e58b32b94e191c8720990918a
Author: Cosimo Cecchi 
Date:   Tue Feb 24 07:49:34 2015 +1000

Fix version check in _XIAllowEvents

Commit 5810d0797160a97012664ffe719a59e1b288a525 changed _XIAllowEvents() to
use _XiCheckVersion() instead of _XiCheckExtInit() to avoid a double display
unlock, but it failed to correctly check for the version, since we should 
set
have_XI22 to True for every version greater or equal to 2.2.

Signed-off-by: Peter Hutterer 

diff --git a/src/XIAllowEvents.c b/src/XIAllowEvents.c
index 52c17ab..e7be099 100644
--- a/src/XIAllowEvents.c
+++ b/src/XIAllowEvents.c
@@ -50,7 +50,7 @@ _XIAllowEvents(Display *dpy, int deviceid, int event_mode, 
Time time,
 if (_XiCheckExtInit(dpy, XInput_2_0, extinfo) == -1)
return (NoSuchExtension);
 
-if (_XiCheckVersion(extinfo, XInput_2_2) == 0)
+if (_XiCheckVersion(extinfo, XInput_2_2) >= 0)
 have_XI22 = True;
 
 if (have_XI22)

commit c648441036cf5ffc5225cd484e2c906d374f0a4b
Author: Michal Srb 
Date:   Mon Nov 3 12:43:40 2014 +0200

XIGrabDevice: Unlock display in error path.

Signed-off-by: Michal Srb 
Signed-off-by: Peter Hutterer 

diff --git a/src/XIGrabDevice.c b/src/XIGrabDevice.c
index a8c5697..22f4ea1 100644
--- a/src/XIGrabDevice.c
+++ b/src/XIGrabDevice.c
@@ -53,14 +53,20 @@ XIGrabDevice(Display* dpy, int deviceid, Window 
grab_window, Time time,
 
 if (mask->mask_len > INT_MAX - 3 ||
 (mask->mask_len + 3)/4 >= 0x)
-return BadValue;
+{
+reply.status = BadValue;
+goto out;
+}
 
 /* mask->mask_len is in bytes, but we need 4-byte units on the wire,
  * and they need to be padded with 0 */
 len = (mask->mask_len + 3)/4;
 buff = calloc(4, len);
 if (!buff)
-return BadAlloc;
+{
+reply.status =  BadAlloc;
+goto out;
+}
 
 GetReq(XIGrabDevice, req);
 req->reqType  = extinfo->codes->major_opcode;
@@ -83,6 +89,7 @@ XIGrabDevice(Display* dpy, int deviceid, Window grab_window, 
Time time,
 if (_XReply(dpy, (xReply *), 0, xTrue) == 0)
reply.status = GrabSuccess;
 
+out:
 UnlockDisplay(dpy);
 SyncHandle();
 

commit 29c77457ad86966ae2204b865fb8b437269063c4
Author: Michal Srb 
Date:   Sat Nov 1 20:00:57 2014 +0200

Refactor XGetExtensionVersion.

_XiGetExtensionVersion was called from XGetExtensionVersion and from
_XiCheckExtInit. When called from _XiCheckExtInit, nothing accounted for the
fact that it can return ((XExtensionVersion *) NoSuchExtension) in case of
error. Also it recursively calls _XiCheckExtInit potentionally causing 
multiple
unlocks if _XiCheckExtInit fails.
-> Remove it and call directly _XiGetExtensionVersionRequest and only call
_XiCheckExtInit only from XGetExtensionVersion.

Signed-off-by: Michal Srb 
Signed-off-by: Peter Hutterer 

diff --git a/src/XExtInt.c b/src/XExtInt.c
index d3c6b7c..672d69a 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -380,7 +380,7 @@ _XiCheckExtInit(
return (-1);
}
((XInputData *) info->data)->vers =
-   _XiGetExtensionVersion(dpy, "XInputExtension", info);
+   _XiGetExtensionVersionRequest(dpy, "XInputExtension", 
info->codes->major_opcode);
 }
 
 if (_XiCheckVersion(info, version_index) < 0) {
diff --git a/src/XGetVers.c b/src/XGetVers.c
index 0751b98..f7e22e6 

libxi: Changes to 'upstream-unstable'

2013-08-12 Thread Julien Cristau
 configure.ac   |2 +-
 src/XGetFCtl.c |3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit b6553cdb36c1bd7071d3bf0493216c5483325716
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed Jul 3 10:28:10 2013 +1000

libXi 1.7.2

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/configure.ac b/configure.ac
index 18d895b..a66fcee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.7.1.901],
+AC_INIT([libXi], [1.7.2],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit d804af99e2dfaf20b99822066a37d586f12c8a5f
Author: Thomas Klausner w...@netbsd.org
Date:   Thu Jun 27 17:16:38 2013 +0200

Remove check that can never be true.

clang warns:
warning: comparison of constant 268435455 with expression of type
'CARD16' (aka 'unsigned short') is always false

Signed-off-by: Thomas Klausner w...@netbsd.org
Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/XGetFCtl.c b/src/XGetFCtl.c
index bb50bf3..2d71fab 100644
--- a/src/XGetFCtl.c
+++ b/src/XGetFCtl.c
@@ -125,9 +125,6 @@ XGetFeedbackControl(
case StringFeedbackClass:
{
xStringFeedbackState *strf = (xStringFeedbackState *) f;
-
-   if (strf-num_syms_supported = (INT_MAX / sizeof(KeySym)))
-   goto out;
size += sizeof(XStringFeedbackState) +
(strf-num_syms_supported * sizeof(KeySym));
}


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1v8vql-0004my...@vasks.debian.org



libxi: Changes to 'upstream-unstable'

2013-06-30 Thread Julien Cristau
 autogen.sh   |4 +
 configure.ac |   13 +++-
 include/X11/extensions/XInput2.h |   47 
 man/Makefile.am  |9 ++-
 man/XGetDeviceControl.txt|   12 ++--
 man/XIBarrierReleasePointer.txt  |   76 ++
 man/XIGrabButton.txt |3 -
 src/Makefile.am  |4 +
 src/XExtInt.c|  110 +++
 src/XGMotion.c   |   24 ++--
 src/XGetBMap.c   |   21 ---
 src/XGetDCtl.c   |   41 ++
 src/XGetDProp.c  |   64 +-
 src/XGetFCtl.c   |   40 +-
 src/XGetKMap.c   |2 
 src/XGetMMap.c   |2 
 src/XGetProp.c   |   16 +++--
 src/XGtSelect.c  |2 
 src/XIBarrier.c  |   81 
 src/XIGrabDevice.c   |   19 --
 src/XIPassiveGrab.c  |   12 +++-
 src/XIProperties.c   |   18 +++---
 src/XIQueryVersion.c |6 +-
 src/XISelEv.c|   65 ++-
 src/XIint.h  |   15 +
 src/XListDProp.c |2 
 src/XListDev.c   |   31 ++
 src/XOpenDev.c   |2 
 src/XQueryDv.c   |   19 --
 xi.pc.in |2 
 30 files changed, 589 insertions(+), 173 deletions(-)

New commits:
commit 957a9d64afd76f878ce6c5570f369e2a7fc1e772
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Jun 27 08:47:16 2013 +1000

libXi 1.7.1.901

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/configure.ac b/configure.ac
index f5ef1e2..18d895b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.7.1],
+AC_INIT([libXi], [1.7.1.901],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 62033a9c83bcdc75b9f1452ce24729eefa8f4dc0
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Jun 27 06:25:02 2013 +1000

Include limits.h to prevent build error: missing INT_MAX

Introduced in 4c8e9bcab459ea5f870d3e56eff15f931807f9b7.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/XIGrabDevice.c b/src/XIGrabDevice.c
index 2bff3d8..a8c5697 100644
--- a/src/XIGrabDevice.c
+++ b/src/XIGrabDevice.c
@@ -31,6 +31,7 @@
 #include X11/extensions/XI2proto.h
 #include X11/extensions/XInput2.h
 #include X11/extensions/extutil.h
+#include limits.h
 #include XIint.h
 
 
diff --git a/src/XIPassiveGrab.c b/src/XIPassiveGrab.c
index 4ed2f09..baadccb 100644
--- a/src/XIPassiveGrab.c
+++ b/src/XIPassiveGrab.c
@@ -30,6 +30,7 @@
 #include X11/extensions/XI2proto.h
 #include X11/extensions/XInput2.h
 #include X11/extensions/extutil.h
+#include limits.h
 #include XIint.h
 
 static int

commit 0f3f5a36d5fc6dc53f69f48a0c83aef6a1fcf381
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue May 28 15:52:34 2013 +1000

If the XGetDeviceDontPropagateList reply has an invalid length, return 0

If we skip over the reply data, return 0 as number of event classes.

Follow-up to 6dd6dc51a2935c72774be81e5cc2ba2c30e9feff.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/XGetProp.c b/src/XGetProp.c
index b49328c..8c69ef2 100644
--- a/src/XGetProp.c
+++ b/src/XGetProp.c
@@ -104,8 +104,10 @@ XGetDeviceDontPropagateList(
_XRead(dpy, (char *)(ec), sizeof(CARD32));
list[i] = (XEventClass) ec;
}
-   } else
+   } else {
+*count = 0;
_XEatDataWords(dpy, rep.length);
+}
 }
 
 UnlockDisplay(dpy);

commit 35ae16dc2f16b24a22625b2d9f76a2128b673a6c
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue May 28 15:52:33 2013 +1000

Change size += to size = in XGetDeviceControl

size += blah is technically correct but it implies that we're looping or
otherwise incrementing the size. Which we don't, it's only ever set once.

Change this to avoid reviewer confusion.

Reported-by: Dave color-me-confused Airlie airl...@redhat.com
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
index 51ed0ae..b576aa5 100644
--- a/src/XGetDCtl.c
+++ b/src/XGetDCtl.c
@@ -122,34 +122,34 @@ XGetDeviceControl(
val_size = 3 * sizeof(int) * r-num_valuators;
if ((sizeof(xDeviceResolutionState) + val_size)  nbytes)
goto out;
-   size += sizeof(XDeviceResolutionState) + val_size;
+   size = sizeof(XDeviceResolutionState) + val_size;
break;
}
 case DEVICE_ABS_CALIB:

libxi: Changes to 'upstream-unstable'

2012-05-20 Thread Cyril Brulebois
 configure.ac   |2 +-
 man/XIQueryVersion.txt |6 +-
 src/XExtInt.c  |   11 ++-
 3 files changed, 16 insertions(+), 3 deletions(-)

New commits:
commit ae163b6202d844a46541928d00049b29cbdf930f
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu May 3 16:01:35 2012 +1000

libXi 1.6.1

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/configure.ac b/configure.ac
index fc8c1f2..2d3a46a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.6.0],
+AC_INIT([libXi], [1.6.1],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit fd5e000308925f703ecd15c288127ab33a456425
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Mon Apr 23 13:32:59 2012 +1000

man: update XIQueryVersion for current server behaviour

XIQueryVersion(v1);
XIQueryVersion(v2);

is now ok as long as v1 = v2.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Jeremy Huddleston jerem...@apple.com

diff --git a/man/XIQueryVersion.txt b/man/XIQueryVersion.txt
index 53118ed..839c18c 100644
--- a/man/XIQueryVersion.txt
+++ b/man/XIQueryVersion.txt
@@ -42,8 +42,12 @@ DESCRIPTION
cases major_version_inout and minor_version_inout are set to the 
server's supported version.
 
-   XIQueryVersion can generate a BadValue error.
+   Consecutive calls to XIQueryVersion by the same client always return the
+   first returned major.minor version. If the client requests a version
+   lower than the first returned major.minor version in a subsequent call, a
+   BadValue error occurs.
 
+   XIQueryVersion can generate a BadValue error.
 
 EXAMPLES
 

commit f8f44f42eb543ecd944a84facba6c09bf48e7711
Author: Chase Douglas chase.doug...@canonical.com
Date:   Fri Apr 20 15:30:30 2012 -0700

Destroy extension record after last display is removed

The extension record is currently leaked and never freed.

Signed-off-by: Chase Douglas chase.doug...@canonical.com
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/XExtInt.c b/src/XExtInt.c
index 43738a2..27638bd 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -434,7 +434,16 @@ XInputClose(
XFree((char *)((XInputData *) info-data)-vers);
XFree((char *)info-data);
 }
-return XextRemoveDisplay(xinput_info, dpy);
+
+if (!XextRemoveDisplay(xinput_info, dpy))
+return 0;
+
+if (xinput_info-ndisplays == 0) {
+XextDestroyExtension(xinput_info);
+xinput_info = NULL;
+}
+
+return 1;
 }
 
 static int


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1sw86i-0003ck...@vasks.debian.org



libxi: Changes to 'upstream-unstable'

2012-04-19 Thread Julien Cristau
Rebased ref, commits from common ancestor:
commit 2ac185d2fd2b884f4f59a7f7f61f414d139859aa
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Mon Mar 26 09:07:34 2012 +1000

Set the RawEvent sourceid (#34240)

XI 2.2 and later include the sourceid in raw events.

X.Org Bug 34240 http://bugs.freedesktop.org/show_bug.cgi?id=34240

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Chase Douglas chase.doug...@canonical.com

diff --git a/src/XExtInt.c b/src/XExtInt.c
index 4f85667..43738a2 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -145,7 +145,7 @@ wireToDeviceChangedEvent(xXIDeviceChangedEvent *in, 
XGenericEventCookie *cookie)
 static int
 wireToHierarchyChangedEvent(xXIHierarchyEvent *in, XGenericEventCookie 
*cookie);
 static int
-wireToRawEvent(xXIRawEvent *in, XGenericEventCookie *cookie);
+wireToRawEvent(XExtDisplayInfo *info, xXIRawEvent *in, XGenericEventCookie 
*cookie);
 static int
 wireToEnterLeave(xXIEnterEvent *in, XGenericEventCookie *cookie);
 static int
@@ -1012,7 +1012,7 @@ XInputWireToCookie(
 case XI_RawTouchUpdate:
 case XI_RawTouchEnd:
 *cookie = *(XGenericEventCookie*)save;
-if (!wireToRawEvent((xXIRawEvent*)event, cookie))
+if (!wireToRawEvent(info, (xXIRawEvent*)event, cookie))
 {
 printf(XInputWireToCookie: CONVERSION FAILURE!  evtype=%d\n,
 ge-evtype);
@@ -1832,14 +1832,13 @@ wireToHierarchyChangedEvent(xXIHierarchyEvent *in, 
XGenericEventCookie *cookie)
 }
 
 static int
-wireToRawEvent(xXIRawEvent *in, XGenericEventCookie *cookie)
+wireToRawEvent(XExtDisplayInfo *info, xXIRawEvent *in, XGenericEventCookie 
*cookie)
 {
 int len, i, bits;
 FP3232 *values;
 XIRawEvent *out;
 void *ptr;
 
-
 len = sizeof(XIRawEvent) + in-valuators_len * 4;
 bits = count_bits((unsigned char*)in[1], in-valuators_len * 4);
 len += bits * sizeof(double) * 2; /* raw + normal */
@@ -1857,9 +1856,14 @@ wireToRawEvent(xXIRawEvent *in, XGenericEventCookie 
*cookie)
 out-time   = in-time;
 out-detail = in-detail;
 out-deviceid   = in-deviceid;
-out-sourceid   = 0; /* 
https://bugs.freedesktop.org/show_bug.cgi?id=34240 */
 out-flags  = in-flags;
 
+/* https://bugs.freedesktop.org/show_bug.cgi?id=34240 */
+if (_XiCheckVersion(info, XInput_2_2) = 0)
+out-sourceid   = in-sourceid;
+else
+out-sourceid   = 0;
+
 out-valuators.mask_len = in-valuators_len * 4;
 out-valuators.mask = next_block(ptr, out-valuators.mask_len);
 memcpy(out-valuators.mask, in[1], out-valuators.mask_len);

commit dfc101e4c6cdac4ff9a51732b2754287fbdc8582
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Mon Mar 26 09:05:24 2012 +1000

Move version comparison into a helper function.

No functional changes, this simply introduces a version helper function that
returns -1, 0 or 1 depending on the version comparison result. To be used
internally only.

Needed for fix to #34240

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Chase Douglas chase.doug...@canonical.com

diff --git a/src/XExtInt.c b/src/XExtInt.c
index 0c64f9a..4f85667 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -344,6 +344,43 @@ static int XInputCheckExtension(Display *dpy, 
XExtDisplayInfo *info)
 return 1;
 }
 
+/*
+ * Compare version numbers between info and the built-in version table.
+ * Returns
+ *   -1 if info's version is less than version_index's version,
+ *   0 if equal (or DontCheck),
+ *   1 if info's version is greater than version_index's version.
+ * Returns -2 on initialization errors which shouldn't happen if you call it
+ * correctly.
+ */
+_X_HIDDEN int
+_XiCheckVersion(XExtDisplayInfo *info,
+int version_index)
+{
+XExtensionVersion *ext;
+
+if (versions[version_index].major_version == Dont_Check)
+return 0;
+
+if (!info-data)
+return -2;
+
+ext = ((XInputData *) info-data)-vers;
+if (!ext)
+return -2;
+
+if (ext-major_version == versions[version_index].major_version 
+ext-minor_version == versions[version_index].minor_version)
+return 0;
+
+if (ext-major_version  versions[version_index].major_version ||
+(ext-major_version == versions[version_index].major_version 
+ ext-minor_version  versions[version_index].minor_version))
+return -1;
+else
+return 1;
+}
+
 /***
  *
  * Check to see if the input extension is installed in the server.
@@ -357,8 +394,6 @@ _XiCheckExtInit(
 register intversion_index,
 XExtDisplayInfo*info)
 {
-XExtensionVersion *ext;
-
 if (!XInputCheckExtension(dpy, info)) {
UnlockDisplay(dpy);

libxi: Changes to 'upstream-unstable'

2011-12-20 Thread Cyril Brulebois
 configure.ac|2 -
 man/XGetFeedbackControl.txt |   55 ++--
 man/XIGrabButton.txt|   16 +---
 man/XIGrabEnter.txt |   10 +++-
 man/XIQueryDevice.txt   |2 -
 src/XExtInt.c   |   32 +
 src/XIQueryDevice.c |4 +--
 7 files changed, 75 insertions(+), 46 deletions(-)

New commits:
commit d58150cf5cf11c0449fc9e9f3c7fc4d29764f6e5
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue Dec 20 10:18:28 2011 +1000

libXi 1.4.5

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/configure.ac b/configure.ac
index 3650edb..9d5d5eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.4.4],
+AC_INIT([libXi], [1.4.5],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 7a30bc136fb6c1561f5cd91606bca01fb877f167
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Fri Aug 12 14:24:26 2011 +1000

Don't use the protocol defines for 2.0 versioning.

Otherwise we run into the old problem again: recompiling libXi against
newer inputproto headers will appear to change the version support,
potentially causing errors or other misbehaviours.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Jeremy Huddleston jerem...@apple.com
(cherry picked from commit ca73cd3b7630e7eb7d26c61c4af10d35dbce5465)

diff --git a/src/XExtInt.c b/src/XExtInt.c
index a5e70b5..63afb8f 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -268,7 +268,7 @@ static XExtensionVersion versions[] = { {XI_Absent, 0, 0},
  XI_Add_DevicePresenceNotify_Minor},
 {XI_Present, XI_Add_DeviceProperties_Major,
  XI_Add_DeviceProperties_Minor},
-{XI_Present, XI_2_Major, XI_2_Minor}
+{XI_Present, 2, 0}
 };
 
 /***

commit e423bfa6045a2b2eeb02080ae39dbee44e062bfa
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Fri Dec 16 07:43:45 2011 +1000

libXi 1.4.4

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/configure.ac b/configure.ac
index 847895a..3650edb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.4.3],
+AC_INIT([libXi], [1.4.4],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 30bff38c7436daad4140fedf867c546bea839b93
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed Oct 26 08:54:53 2011 +1000

Fix duplicate sizeof in copy_classes

sizeof(bla * sizeof()) is'nt right.

Plus add some () to the next_block call too to emphasise that *nclasses is
the multiplicator.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Jeremy Huddleston jerem...@apple.com
(cherry picked from commit 6d6ae8fc8b9620bf864ac7dff8d818573eee3e4f)

diff --git a/src/XExtInt.c b/src/XExtInt.c
index 2ce2d44..a5e70b5 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -1463,8 +1463,8 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int 
*nclasses)
 
 ptr_wire = (char*)from;
 ptr_lib = to-classes;
-to-classes = next_block(ptr_lib, *nclasses * sizeof(XIAnyClassInfo*));
-memset(to-classes, 0, sizeof(*nclasses * sizeof(XIAnyClassInfo*)));
+to-classes = next_block(ptr_lib, (*nclasses) * sizeof(XIAnyClassInfo*));
+memset(to-classes, 0, (*nclasses) * sizeof(XIAnyClassInfo*));
 len = 0; /* count wire length */
 
 for (i = 0; i  *nclasses; i++)

commit db739c0770d49e8b47da90f160b99c76be996a18
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Oct 27 10:27:49 2011 +1000

man: passive grabs return the number of failed modifier combinations

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 323730f7fa70190d2ea00e62c6964fee524ca430)

diff --git a/man/XIGrabButton.txt b/man/XIGrabButton.txt
index 18c7ffc..81e077a 100644
--- a/man/XIGrabButton.txt
+++ b/man/XIGrabButton.txt
@@ -64,7 +64,7 @@ SYNOPSIS
   or XIAnyKeycode.
 
num_modifiers
-  Number of elements in modifiers or modifiers_return
+  Number of elements in modifiers or modifiers_inout.
 
modifiers
   Specifies the set of latched and base modifiers or
@@ -178,6 +178,14 @@ DESCRIPTION
XIUngrabButton and XIUngrabKeycode can generate BadDevice,
BadMatch, BadValue and BadWindow errors.
 
+RETURN VALUE
+
+   XIGrabButton and XIGrabKeycode return the number of modifier combination
+   that could not establish a passive grab. The modifiers are returned in
+   modifiers_inout, along with the respective error for this modifier
+   combination. If XIGrabButton or XIGrabKeycode return 

libxi: Changes to 'upstream-unstable'

2011-06-09 Thread Cyril Brulebois
 configure.ac |2 +-
 man/XGetExtensionVersion.txt |   11 ++-
 man/XIChangeHierarchy.txt|3 ++-
 man/XIChangeProperty.txt |2 +-
 man/XIGrabButton.txt |2 +-
 man/XIGrabEnter.txt  |2 +-
 src/XExtInt.c|2 +-
 src/XIHierarchy.c|3 +++
 src/XIPassiveGrab.c  |4 ++--
 src/XISelEv.c|2 +-
 10 files changed, 19 insertions(+), 14 deletions(-)

New commits:
commit 9fd7b9a9652ecebb8eb533c2a30b9fa7bb186b90
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue Jun 7 13:32:11 2011 +1000

libXi 1.4.3

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/configure.ac b/configure.ac
index 08501c9..847895a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.4.2],
+AC_INIT([libXi], [1.4.3],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 7bdaa3635b7eb4bd993c317922d35cad7ed0cab9
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Fri Jun 3 15:10:27 2011 +1000

man: Fix typo in XIChangeProperty

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 938ef832b892fdefe0d5c2bb4510c91bbbccca9f)

diff --git a/man/XIChangeProperty.txt b/man/XIChangeProperty.txt
index 76a0e8b..2e5eea1 100644
--- a/man/XIChangeProperty.txt
+++ b/man/XIChangeProperty.txt
@@ -168,7 +168,7 @@ device.  XIChangeProperty performs the following:
 - If mode is PropModeReplace, XIChangeProperty discards the previous
   property value and stores the new data.
 
-- If mode is PropModePrepend or PropModeAppend, XChangeProperty
+- If mode is PropModePrepend or PropModeAppend, XIChangeProperty
   inserts the specified data before the beginning of the existing
   data or onto the end of the existing data, respectively.  The type
   and format must match the existing property value, or a BadMatch

commit 63027b24113b349720f1612a4426933c1364ea28
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Fri Jun 3 15:02:35 2011 +1000

man: Fix wrong event names in XIGrabButton.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 597a6a51721d30c4354d1133bb6da6bd2e12446e)

diff --git a/man/XIGrabButton.txt b/man/XIGrabButton.txt
index fb806af..4e9bcb9 100644
--- a/man/XIGrabButton.txt
+++ b/man/XIGrabButton.txt
@@ -107,7 +107,7 @@ DESCRIPTION
device is the device specified with deviceid. In the future,
the device is actively grabbed (as for XIGrabDevice, the
last-grab time is set to the time at which the button or keycode
-   was pressed and the X_XIButtonPress or X_XIKeyPress event is
+   was pressed and the XI_ButtonPress or XI_KeyPress event is
reported if all of the following conditions are true:
  * The device is not grabbed, and the specified button or
keycode is logically pressed when the specified modifier

commit 9affea8cfd3f583647e9c6ea2b5debb97e6904c5
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Jun 2 16:21:59 2011 +1000

Use Data, not Data32 in XIPassiveGrabDevice

Data32 takes and iterates over an array of longs, thus skipping every 4
bytes on LP64. Here we only have arrays of ints, use the normal Data macro
instead.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Jeremy Huddleston jerem...@apple.com
(cherry picked from commit 9faab2bc0bdd4d98a04e572a7a5201bfcd3bdc70)

diff --git a/src/XIPassiveGrab.c b/src/XIPassiveGrab.c
index feef74b..34f1bf3 100644
--- a/src/XIPassiveGrab.c
+++ b/src/XIPassiveGrab.c
@@ -67,9 +67,9 @@ _XIPassiveGrabDevice(Display* dpy, int deviceid, int 
grabtype, int detail,
 
 buff = calloc(4, req-mask_len);
 memcpy(buff, mask-mask, mask-mask_len);
-Data32(dpy, buff, req-mask_len * 4);
+Data(dpy, buff, req-mask_len * 4);
 for (i = 0; i  num_modifiers; i++)
-Data32(dpy, modifiers_inout[i].modifiers, 4);
+Data(dpy, (char*)modifiers_inout[i].modifiers, 4);
 
 free(buff);
 

commit 641d1e9943208a8b2c2aef843bd17cb22f833b06
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Jun 2 14:17:44 2011 +1000

man: fix missing comma in XIGrabEnter man page
(cherry picked from commit 67441d30df756eb715a262d3439865dedd4055e8)

diff --git a/man/XIGrabEnter.txt b/man/XIGrabEnter.txt
index fff3773..f75a5ad 100644
--- a/man/XIGrabEnter.txt
+++ b/man/XIGrabEnter.txt
@@ -14,7 +14,7 @@ SYNOPSIS
 
int XIGrabEnter( Display *display,
 int deviceid,
-Window grab_window
+Window grab_window,
 Cursor cursor,
 int grab_mode,
 int paired_device_mode,

commit f37dee93cb288f11d286c7bc4222b2f571ccfd65
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu May 5 

libxi: Changes to 'upstream-unstable'

2011-03-26 Thread Cyril Brulebois
 configure.ac |   36 +++---
 include/X11/extensions/XInput2.h |2 -
 man/XIGrabButton.txt |6 +++
 man/XIGrabEnter.txt  |6 +++
 man/XIQueryPointer.txt   |3 +
 src/Makefile.am  |2 -
 src/XExtInt.c|   19 +--
 src/XIAllowEvents.c  |2 -
 src/XIDefineCursor.c |2 -
 src/XIGetDevFocus.c  |2 -
 src/XIGrabDevice.c   |   10 +++---
 src/XIHierarchy.c|2 -
 src/XIPassiveGrab.c  |6 +--
 src/XIProperties.c   |8 ++---
 src/XIQueryDevice.c  |2 -
 src/XIQueryPointer.c |2 -
 src/XISelEv.c|4 +-
 src/XISetCPtr.c  |   62 +++
 src/XISetDevFocus.c  |2 -
 src/XIWarpPointer.c  |2 -
 src/XSetCPtr.c   |   62 ---
 21 files changed, 134 insertions(+), 108 deletions(-)

New commits:
commit 32236a7779f721d252d633d06ade306f246421a3
Author: Jeremy Huddleston jerem...@apple.com
Date:   Fri Mar 18 16:30:13 2011 -0700

configure.ac: 1.4.2

Signed-off-by: Jeremy Huddleston jerem...@apple.com

diff --git a/configure.ac b/configure.ac
index 405cd34..08501c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXi], [1.4.1],
+AC_INIT([libXi], [1.4.2],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h])

commit 2d638fc37b0dbf28e5c826f74f68ada83a8c3e2b
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue Mar 15 10:55:10 2011 +1000

Force alignment with sizeof(Atom) for XIButtonClassInfo

The memory layout of an XIButtonClassInfo is
[struct XIButtonClassInfo][mask][labels]

With the mask being currently 4-byte aligned and labels a list of Atoms. On
LP64, Atoms are 8 byte, leading to unaligned access for some mask lengths.
Force the alignment to be sizeof(Atom).

Reported-by: Christian Weisgerber na...@mips.inka.de
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Tested-by: Christian Weisgerber na...@mips.inka.de
Reviewed-by: Adam Jackson a...@redhat.com

diff --git a/src/XExtInt.c b/src/XExtInt.c
index 5a1bca6..d1451cc 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -1028,7 +1028,9 @@ sizeDeviceClassType(int type, int num_elements)
 case XIButtonClass:
 l = sizeof(XIButtonClassInfo);
 l += num_elements * sizeof(Atom);
-l += num_elements + 7)/8) + 3)/4) * 4;
+/* Force mask alignment with longs to avoid
+ * unaligned access when accessing the atoms. */
+l += num_elements + 7)/8) + 3)/4) * sizeof(Atom);
 break;
 case XIKeyClass:
 l = sizeof(XIKeyClassInfo);
@@ -1121,12 +1123,16 @@ copyDeviceChangedEvent(XGenericEventCookie *in_cookie,
 {
 case XIButtonClass:
 {
+int size;
 XIButtonClassInfo *bin, *bout;
 bin = (XIButtonClassInfo*)any;
 bout = next_block(ptr, sizeof(XIButtonClass));
 
 *bout = *bin;
-bout-state.mask = next_block(ptr, bout-state.mask_len);
+/* Force mask alignment with longs to avoid unaligned
+ * access when accessing the atoms. */
+size = bout-state.mask_len/4 * sizeof(Atom);
+bout-state.mask = next_block(ptr, size);
 memcpy(bout-state.mask, bin-state.mask,
 bout-state.mask_len);
 
@@ -1474,14 +1480,18 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int 
nclasses)
 XIButtonClassInfo *cls_lib;
 xXIButtonInfo *cls_wire;
 uint32_t *atoms;
+int size;
 int j;
 
 cls_lib = next_block(ptr_lib, sizeof(XIButtonClassInfo));
 cls_wire = (xXIButtonInfo*)any_wire;
 
 cls_lib-num_buttons = cls_wire-num_buttons;
-cls_lib-state.mask_len = cls_wire-num_buttons + 
7)/8) + 3)/4) * 4;
-cls_lib-state.mask = next_block(ptr_lib, 
cls_lib-state.mask_len);
+size = cls_wire-num_buttons + 7)/8) + 3)/4);
+cls_lib-state.mask_len = size * 4;
+/* Force mask alignment with longs to avoid unaligned
+ * access when accessing the atoms. */
+cls_lib-state.mask = next_block(ptr_lib, size * 
sizeof(Atom));
 memcpy(cls_lib-state.mask, cls_wire[1],

libxi: Changes to 'upstream-unstable'

2011-02-07 Thread Julien Cristau
Rebased ref, commits from common ancestor:
commit be2a1b33c9394dcab52622bde53c83f1dd840ea0
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed Jan 26 07:42:53 2011 +1000

libXi 1.4.1

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/configure.ac b/configure.ac
index 0a4b384..e26392e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.60])
 
-AC_INIT(libXi, 1.4.0, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
+AC_INIT(libXi, 1.4.1, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 

commit e0c95ce2348a9c9afaa4862368c7a5ae6913457c
Author: Carlos Garnacho carl...@gnome.org
Date:   Mon Jan 24 12:35:04 2011 +0100

Fill in mods/group-effective in XIQueryPointer()

the other XIModifierState/XIGroupState fields are being set correctly,
but the effective field was being left as undefined memory.

Signed-off-by: Carlos Garnacho carl...@gnome.org
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/XIQueryPointer.c b/src/XIQueryPointer.c
index b3bfebc..e068a97 100644
--- a/src/XIQueryPointer.c
+++ b/src/XIQueryPointer.c
@@ -86,9 +86,12 @@ XIQueryPointer(Display *dpy,
 mods-base  = rep.mods.base_mods;
 mods-latched   = rep.mods.latched_mods;
 mods-locked= rep.mods.locked_mods;
+mods-effective = mods-base | mods-latched | mods-locked;
+
 group-base = rep.group.base_group;
 group-latched  = rep.group.latched_group;
 group-locked   = rep.group.locked_group;
+group-effective= group-base | group-latched | group-locked;
 
 buttons-mask_len   = rep.buttons_len * 4;
 buttons-mask   = malloc(buttons-mask_len);

commit a5961a8459614fcaa801a47cda07d3ee8246b16f
Author: Philipp Reh s...@s-e-f-i.de
Date:   Mon Jan 10 17:35:57 2011 +0100

Fix passive grabs.

_XIPassiveGrabDevice, which is called by alle the passive grab functions,
wrongly returns an error when it shouldn't.
The attached patch adds the missing not to properly test the error
condition of _XReply.

Signed-off-by: Philipp Reh s...@s-e-f-i.de
Reviewed-by: Daniel Stone dan...@fooishbar.org
Reviewed-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/XIPassiveGrab.c b/src/XIPassiveGrab.c
index 8953013..98eb806 100644
--- a/src/XIPassiveGrab.c
+++ b/src/XIPassiveGrab.c
@@ -73,7 +73,7 @@ _XIPassiveGrabDevice(Display* dpy, int deviceid, int 
grabtype, int detail,
 
 free(buff);
 
-if (_XReply(dpy, (xReply *)reply, 0, xTrue))
+if (!_XReply(dpy, (xReply *)reply, 0, xTrue))
 {
UnlockDisplay(dpy);
SyncHandle();

commit 408db9e86a92c897390129ef27a804d7cf6ba6fb
Author: Paulo Zanoni pzan...@mandriva.com
Date:   Thu Dec 16 14:10:05 2010 -0200

Use docbookx.dtd version 4.3 for all docs

Signed-off-by: Paulo Zanoni pzan...@mandriva.com
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com

diff --git a/doc/porting.xml b/doc/porting.xml
index 1b2f1d7..1ae7afe 100644
--- a/doc/porting.xml
+++ b/doc/porting.xml
@@ -1,6 +1,6 @@
 ?xml version=1.0 encoding=UTF-8 ?
-!DOCTYPE book PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN
-   http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd;
+!DOCTYPE book PUBLIC -//OASIS//DTD DocBook XML V4.3//EN
+   http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd;
 
 
 !-- lifted from troff+ms+XMan by doclifter --

commit 9419fe9f0b21232d342885a693fbf9222b5844e4
Author: Daniel Stone dan...@fooishbar.org
Date:   Mon Dec 13 19:49:58 2010 +

WireToEvent: Set display member of all events as well

All events were getting random uninitialised garbage for display; fix
that.

Signed-off-by: Daniel Stone dan...@fooishbar.org

diff --git a/src/XExtInt.c b/src/XExtInt.c
index eed6637..f96e3ff 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -1347,6 +1347,7 @@ wireToDeviceEvent(xXIDeviceEvent *in, 
XGenericEventCookie* cookie)
 cookie-data = ptr_lib = malloc(len);
 
 out = next_block(ptr_lib, sizeof(XIDeviceEvent));
+out-display = cookie-display;
 out-type = in-type;
 out-extension = in-extension;
 out-evtype = in-evtype;
@@ -1546,6 +1547,7 @@ wireToDeviceChangedEvent(xXIDeviceChangedEvent *in, 
XGenericEventCookie *cookie)
 cookie-data = out = malloc(sizeof(XIDeviceChangedEvent) + len);
 
 out-type = in-type;
+out-display = cookie-display;
 out-extension = in-extension;
 out-evtype = in-evtype;
 out-send_event = ((in-type  0x80) != 0);
@@ -1575,6 +1577,7 @@ wireToHierarchyChangedEvent(xXIHierarchyEvent *in, 
XGenericEventCookie *cookie)
 cookie-data = out = malloc(sizeof(XIHierarchyEvent) + in-num_info * 
sizeof(XIHierarchyInfo));;
 
 out-info   = (XIHierarchyInfo*)out[1];
+out-display 

libxi: Changes to 'upstream-unstable'

2009-03-12 Thread Julien Cristau
 README   |   25 +
 configure.ac |2 +-
 src/XGetDCtl.c   |7 ---
 src/XListDProp.c |   12 +---
 4 files changed, 35 insertions(+), 11 deletions(-)

New commits:
commit 69422ae36ede8fd5d7975c1e2b74c32906ad8535
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Feb 26 09:20:44 2009 +1000

libXi 1.2.1

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/configure.ac b/configure.ac
index aded614..6cef716 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
 
-AC_INIT(libXi, 1.2.0, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
+AC_INIT(libXi, 1.2.1, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 

commit f63ea39a328ce0e5e6c980243e2ebea15634dc7d
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed Feb 25 17:00:16 2009 +1000

XGetDeviceControl: size the libXi structs, not the wire structs (#20293)

X.Org Bug 20293 http://bugs.freedesktop.org/show_bug.cgi?id=20293

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit cbdc33d903ec6f90a42ec3c31905eeaef9ecf0a2)

diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
index bdddfd7..2012ee8 100644
--- a/src/XGetDCtl.c
+++ b/src/XGetDCtl.c
@@ -122,17 +122,17 @@ XGetDeviceControl(dpy, dev, control)
}
 case DEVICE_ABS_CALIB:
 {
-size += sizeof(xDeviceAbsCalibState);
+size += sizeof(XDeviceAbsCalibState);
 break;
 }
 case DEVICE_ABS_AREA:
 {
-size += sizeof(xDeviceAbsAreaState);
+size += sizeof(XDeviceAbsAreaState);
 break;
 }
 case DEVICE_CORE:
 {
-size += sizeof(xDeviceCoreState);
+size += sizeof(XDeviceCoreState);
 break;
 }
default:

commit 6e65cf0776019b2eec6be4a06fef7838562e94a8
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed Feb 25 16:59:04 2009 +1000

XGetDeviceControl: Add a missing break leading to wrong length calculation.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 78f64722c57ff5ec5d0ae35da0c8f151598e6d6b)

diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
index 7689059..bdddfd7 100644
--- a/src/XGetDCtl.c
+++ b/src/XGetDCtl.c
@@ -133,6 +133,7 @@ XGetDeviceControl(dpy, dev, control)
 case DEVICE_CORE:
 {
 size += sizeof(xDeviceCoreState);
+break;
 }
default:
size += d-length;

commit 17df06d5aeceb4798caf487a1d57efe58fa7e3fa
Author: Alan Coopersmith alan.coopersm...@sun.com
Date:   Mon Feb 2 20:34:34 2009 -0800

Add README with pointers to mailing list, bugzilla  git repos

Signed-off-by: Alan Coopersmith alan.coopersm...@sun.com
(cherry picked from commit 6e1159a9059d762d6b5d24455237a088e839fe2c)

diff --git a/README b/README
index e69de29..44c705e 100644
--- a/README
+++ b/README
@@ -0,0 +1,25 @@
+libXi - library for the X Input Extension
+
+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/lib/libXi
+
+http://cgit.freedesktop.org/xorg/lib/libXi
+
+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
+

commit f2f92b1df861c1f571edc89eddbb8d72a228e2a8
Author: Paulo Cesar Pereira de Andrade p...@mandriva.com.br
Date:   Thu Jan 29 19:30:30 2009 -0200

Return NULL on error, and match LockDisplay with UnlockDisplay.
(cherry picked from commit ba2546a51d5f9087ec54fba7cae46ea1f210198a)

diff --git a/src/XListDProp.c b/src/XListDProp.c
index aee2737..66b9eca 100644
--- a/src/XListDProp.c
+++ b/src/XListDProp.c
@@ -49,33 +49,31 @@ XListDeviceProperties(Display* dpy, XDevice* dev, int 
*nprops_return)
 Atom*props = NULL;
 
 LockDisplay(dpy);
+*nprops_return = 0;
 if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
-   return (NoSuchExtension);
+   goto cleanup;
 
 GetReq(ListDeviceProperties, req);
 req-reqType = info-codes-major_opcode;
 req-ReqType = X_ListDeviceProperties;
 req-deviceid = dev-device_id;
 
-if (!_XReply(dpy, (xReply*)rep, 0, xFalse)) {
-*nprops_return = 0;
+if (!_XReply(dpy, (xReply*)rep, 0, xFalse))
 goto cleanup;
-}
-
-*nprops_return = rep.nAtoms;
 
 if (rep.nAtoms) {
 props = 

libxi: Changes to 'upstream-unstable'

2009-02-16 Thread Julien Cristau
 configure.ac  |4 
 man/Makefile.am   |   14 ++-
 man/XGetDeviceProperty.man|  191 ++
 man/XListDeviceProperties.man |   95 
 man/XListInputDevices.man |1 
 src/Makefile.am   |4 
 src/XChDProp.c|  106 +++
 src/XDelDProp.c   |   64 ++
 src/XExtInt.c |   19 +++-
 src/XGetDProp.c   |  139 ++
 src/XListDProp.c  |   84 ++
 11 files changed, 716 insertions(+), 5 deletions(-)

New commits:
commit 2d586065649304b2864afddee6f6225a4a61a0c9
Author: Peter Hutterer peter.hutte...@redhat.com
Date:   Wed Dec 3 12:50:45 2008 +1000

libXi 1.2.0

Requires inputproto 1.5.0 or later.

diff --git a/configure.ac b/configure.ac
index b02c5e8..aded614 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
 
-AC_INIT(libXi, 1.1.99.2, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
+AC_INIT(libXi, 1.2.0, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 
@@ -15,7 +15,7 @@ AC_PROG_CC
 AC_PROG_LIBTOOL
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XI, xproto x11 xextproto xext inputproto = 1.4)
+PKG_CHECK_MODULES(XI, xproto x11 xextproto xext inputproto = 1.5)
 AC_SUBST(XI_CFLAGS)
 AC_SUBST(XI_LIBS)
 

commit 305d356e43462834a2fdd2cf59d47b055c2416fd
Author: Peter Hutterer peter.hutte...@redhat.com
Date:   Mon Nov 17 11:50:06 2008 +1000

Add support for XI 1.5 device properties.

This is a manual merge from master onto libXi 1.1.4. The branches have
diverged too much to make cherry-picking reasonable and readable.

This patch includes the property support provided by the combination of the
following patches:
- 7d5bb99ffce3200f82420c5a5ebac3b445aac633
- 0211e3e8277c590349903989f1676f6af4baa44b
- bfd2e08f3530091fbcd8c078f684e9aab9057df0
- bec02767629ed795582ba3f645299d7036093511
- f9a5371d43b2c6023745f766d0e8ceff2acdff60
- e179b124aac13387c6f730197b8852c1f69eb9e3

Man pages are copied from the parsed docbook output from master.

diff --git a/man/Makefile.am b/man/Makefile.am
index 9efc88c..c8c7624 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -51,7 +51,9 @@ libman_PRE = \
XSetDeviceButtonMapping.man \
XSetDeviceFocus.man \
XSetDeviceMode.man \
-   XSetDeviceValuators.man
+   XSetDeviceValuators.man \
+   XListDeviceProperties.man \
+   XGetDeviceProperty.man
 
 BUILT_SOURCES = shadows.DONE
 
@@ -89,7 +91,8 @@ all_shadows =\
 $(XOpenDevice_shadows)   \
 $(XSetDeviceButtonMapping_shadows)   \
 $(XSetDeviceFocus_shadows)   \
-$(XSelectExtensionEvent_shadows)
+$(XSelectExtensionEvent_shadows) \
+$(XGetDeviceProperty_shadows)
 
 
 XGetDeviceControl_shadows = \
@@ -134,6 +137,10 @@ XSetDeviceFocus_shadows =   \
 XSelectExtensionEvent_shadows = \
 XGetSelectedExtensionEvents
 
+XGetDeviceProperty_shadows =\
+XDeleteDeviceProperty \
+XChangeDeviceProperty
+
 shadows.DONE:
-rm -f $(all_shadows:=...@lib_man_suffix@)
(for i in $(XGetDeviceControl_shadows:=...@lib_man_suffix@) ; do \
@@ -178,3 +185,6 @@ shadows.DONE:
(for i in $(XSelectExtensionEvent_shadows:=...@lib_man_suffix@) ; do \
 echo .so 
man$(LIB_MAN_DIR_SUFFIX)/XSelectExtensionEvent.$(LIB_MAN_SUFFIX)  $$i; \
 done)
+   (for i in $(XGetDeviceProperty_shadows:=...@lib_man_suffix@) ; do \
+echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetDeviceProperty.$(LIB_MAN_SUFFIX) 
 $$i; \
+done)
diff --git a/man/XGetDeviceProperty.man b/man/XGetDeviceProperty.man
new file mode 100644
index 000..6944457
--- /dev/null
+++ b/man/XGetDeviceProperty.man
@@ -0,0 +1,191 @@
+.\ Title: XGetDeviceProperty
+.\Author: Peter Hutterer
+.\ Generator: DocBook XSL Stylesheets v1.73.2 http://docbook.sf.net/
+.\  Date: pubdateJuly 9, 2008/pubdate
+.\Manual: XINPUT FUNCTIONS
+.\Source: __xorgversion__
+.\
+.TH XGETDEVICEPROPERTY __libmansuffix__ pubdateJuly 9, 2008/pubdate 
__xorgversion__ XINPUT FUNCTIONS
+.\ disable hyphenation
+.nh
+.\ disable justification (adjust text to left margin only)
+.ad l
+.SH NAME
+XGetDeviceProperty, XChangeDeviceProperty, XDeleteDeviceProperty - Get, change 
or delete a device's property.
+.SH SYNTAX
+.sp
+.ft B
+.nf
+#include X11/extensions/XInput\.h
+.fi
+.ft
+.HP 23
+.BI int XGetDeviceProperty(Display\ * display , XDevice\ * device , 
Atom\  property , long\  offset , long\  length , Bool\  delete 
, Bool\  pending , Atom\  req_type , Atom\ * actual_type_return , 
int\ * actual_format_return , 

libxi: Changes to 'upstream-unstable'

2008-11-16 Thread Julien Cristau
 configure.ac|2 +-
 man/Makefile.am |1 -
 src/XGMotion.c  |2 ++
 src/XGetDCtl.c  |   12 +---
 4 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit f0ecfd1952289f5ff33297e3358552365e047f09
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Mon Nov 17 11:12:39 2008 +1000

libXi 1.1.4

diff --git a/configure.ac b/configure.ac
index 4df3964..02972ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
 
-AC_INIT(libXi, 1.1.3, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
+AC_INIT(libXi, 1.1.4, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 

commit 3e99cc281509c70c9240e71ae55cf4e62c6569ba
Author: Matthieu Herrb [EMAIL PROTECTED]
Date:   Sun Mar 9 08:30:32 2008 +0100

nuke RCS Ids

diff --git a/man/Makefile.am b/man/Makefile.am
index f91efaf..9efc88c 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,4 +1,3 @@
-# $Id$
 #
 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 # 

commit 411340ccb7070e2e966a36f64f2fb3019ea0242a
Author: Alan Coopersmith [EMAIL PROTECTED]
Date:   Thu Nov 29 13:49:21 2007 -0800

Coverity #743/744: Returned without freeing storage bufp/savp

If either bufp or savp failed to malloc, we returned without freeing the 
other.

diff --git a/src/XGMotion.c b/src/XGMotion.c
index daa8792..cd361dd 100644
--- a/src/XGMotion.c
+++ b/src/XGMotion.c
@@ -115,6 +115,8 @@ Time stop;
 savp = readp = (int *)Xmalloc(size);
 bufp = (int *)Xmalloc(size2);
 if (!bufp || !savp) {
+   Xfree(bufp);
+   Xfree(savp);
*nEvents = 0;
_XEatData(dpy, (unsigned long)size);
UnlockDisplay(dpy);

commit 5ac8f5dcfb2cf5f695c903179a5a95ac6bd4303e
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Tue Nov 27 10:47:56 2007 +1030

GetDeviceControl: calculate the length field correctly.

Length field should indicate the length of the struct in bytes. Not the 
length
of the pointer to the struct...
(cherry picked from commit ddcc71df2a273a410cb5a933aef5501fa56d84cf)

diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
index 2e06b65..7689059 100644
--- a/src/XGetDCtl.c
+++ b/src/XGetDCtl.c
@@ -104,6 +104,12 @@ XGetDeviceControl(dpy, dev, control)
sav = d;
_XRead(dpy, (char *)d, nbytes);
 
+/* In theory, we should just be able to use d-length to get the size.
+ * Turns out that a number of X servers (up to and including server
+ * 1.4) sent the wrong length value down the wire. So to not break
+ * apps that run against older servers, we have to calculate the size
+ * manually.
+ */
switch (d-control) {
case DEVICE_RESOLUTION:
{
@@ -170,7 +176,7 @@ XGetDeviceControl(dpy, dev, control)
 XDeviceAbsCalibState *C = (XDeviceAbsCalibState *) Device;
 
 C-control = DEVICE_ABS_CALIB;
-C-length = sizeof(C);
+C-length = sizeof(XDeviceAbsCalibState);
 C-min_x = c-min_x;
 C-max_x = c-max_x;
 C-min_y = c-min_y;
@@ -188,7 +194,7 @@ XGetDeviceControl(dpy, dev, control)
 XDeviceAbsAreaState *A = (XDeviceAbsAreaState *) Device;
 
 A-control = DEVICE_ABS_AREA;
-A-length = sizeof(A);
+A-length = sizeof(XDeviceAbsAreaState);
 A-offset_x = a-offset_x;
 A-offset_y = a-offset_y;
 A-width = a-width;
@@ -204,7 +210,7 @@ XGetDeviceControl(dpy, dev, control)
 XDeviceCoreState *C = (XDeviceCoreState *) Device;
 
 C-control = DEVICE_CORE;
-C-length = sizeof(C);
+C-length = sizeof(XDeviceCoreState);
 C-status = c-status;
 C-iscore = c-iscore;
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



libxi: Changes to 'upstream-unstable'

2007-09-05 Thread Julien Cristau
 .gitignore|1 +
 configure.ac  |2 +-
 man/XListInputDevices.man |4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 0239ef13d66113024066b7db8ade3942af563656
Author: Eric Anholt [EMAIL PROTECTED]
Date:   Wed Sep 5 09:45:20 2007 -0700

Bump version to 1.1.3.

diff --git a/configure.ac b/configure.ac
index 2641313..4df3964 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
 
-AC_INIT(libXi, 1.1.2, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
+AC_INIT(libXi, 1.1.3, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 

commit 235b283ef6eda4591c95b4749d0a8cd0181783a6
Author: James Cloos [EMAIL PROTECTED]
Date:   Mon Sep 3 05:53:41 2007 -0400

Add *~ to .gitignore to skip patch/emacs droppings

diff --git a/.gitignore b/.gitignore
index 4ee60b1..0c9507a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ MakeOut
 missing
 mkinstalldirs
 xi.pc
+*~

commit 89d7e38124cdb34c55f8c28680725b5b645fe106
Author: Eric S. Raymond [EMAIL PROTECTED]
Date:   Sun Jan 14 10:51:00 2007 -0800

Bug #9659: Bad markup on XListInputDevices.3x

X.Org Bugzilla #9659 https://bugs.freedesktop.org/show_bug.cgi?id=9659

diff --git a/man/XListInputDevices.man b/man/XListInputDevices.man
index 9156fe2..2483ea4 100644
--- a/man/XListInputDevices.man
+++ b/man/XListInputDevices.man
@@ -175,7 +175,7 @@ num_buttons specifies the number of buttons that the device 
has.
 The XValuatorInfo structure defines the characteristics of the valuators
 on the device.  It is defined as follows:
 .LP
-.DE
+.DS
 .nf
 typedef struct _XValuatorInfo {
XID class;
@@ -186,7 +186,7 @@ typedef struct  _XValuatorInfo {
XAxisInfoPtraxes;
 } XValuatorInfo;
 .fi
-.DS
+.DE
 num_axes contains the number of axes the device supports.
 .LP
 mode is a constant that has one of the following


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



libxi: Changes to 'upstream-unstable'

2007-07-31 Thread Julien Cristau
 configure.ac|2 +-
 src/XChgDCtl.c  |   13 -
 src/XExtInt.c   |2 +-
 src/XGtSelect.c |4 
 src/XStFocus.c  |2 ++
 5 files changed, 20 insertions(+), 3 deletions(-)

New commits:
commit bf01e98979e6fa500f74d882c1b21746c60d5d31
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Wed Aug 1 05:16:45 2007 +0300

XSetDeviceFocus: Add missing extension check

Actually check for Xi existing before we try to do anything fancy.

diff --git a/src/XStFocus.c b/src/XStFocus.c
index 08578c8..e544126 100644
--- a/src/XStFocus.c
+++ b/src/XStFocus.c
@@ -72,6 +72,8 @@ XSetDeviceFocus(dpy, dev, focus, revert_to, time)
 XExtDisplayInfo *info = XInput_find_display(dpy);
 
 LockDisplay(dpy);
+if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
+   return (NoSuchExtension);
 
 GetReq(SetDeviceFocus, req);
 req-reqType = info-codes-major_opcode;

commit 8f5f7e9d6fc288a5cc00df3a7fec44211cdbe8f4
Author: David Weinehall [EMAIL PROTECTED]
Date:   Wed Aug 1 05:12:21 2007 +0300

XGetSelectedExtensionEvents: Still more locking bugs

Fix a couple more return-without-unlocks.

diff --git a/src/XGtSelect.c b/src/XGtSelect.c
index 9f596fd..95d3c87 100644
--- a/src/XGtSelect.c
+++ b/src/XGtSelect.c
@@ -106,6 +106,8 @@ XGetSelectedExtensionEvents(dpy, w, this_client_count, 
this_client_list,
sizeof(XEventClass));
if (!*this_client_list) {
_XEatData(dpy, (unsigned long)tlen + alen);
+UnlockDisplay(dpy);
+SyncHandle();
return (Success);
}
for (i = 0; i  *this_client_count; i++) {
@@ -122,6 +124,8 @@ XGetSelectedExtensionEvents(dpy, w, this_client_count, 
this_client_list,
Xfree((char *)*this_client_list);
*this_client_list = NULL;
_XEatData(dpy, (unsigned long)alen);
+UnlockDisplay(dpy);
+SyncHandle();
return (Success);
}
for (i = 0; i  *all_clients_count; i++) {

commit a07c3cc1eec0427a056414ef44ef6ee4204df383
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Wed Aug 1 03:03:44 2007 +0300

XChangeDeviceControl: Fix completely broken locking

Drop the display lock when we exit from XChangeDeviceControl(), instead of
leaking it.

diff --git a/src/XChgDCtl.c b/src/XChgDCtl.c
index f7a537a..952164c 100644
--- a/src/XChgDCtl.c
+++ b/src/XChgDCtl.c
@@ -104,8 +104,11 @@ XChangeDeviceControl(dpy, dev, control, d)
UnlockDisplay(dpy);
SyncHandle();
return (NoSuchExtension);
-   } else
+   } else {
+UnlockDisplay(dpy);
+SyncHandle();
return (rep.status);
+}
 }
 case DEVICE_ABS_CALIB:
 {
@@ -132,6 +135,8 @@ XChangeDeviceControl(dpy, dev, control, d)
 return NoSuchExtension;
 }
 else {
+UnlockDisplay(dpy);
+SyncHandle();
 return rep.status;
 }
 }
@@ -158,6 +163,8 @@ XChangeDeviceControl(dpy, dev, control, d)
 return NoSuchExtension;
 }
 else {
+UnlockDisplay(dpy);
+SyncHandle();
 return rep.status;
 }
 }
@@ -179,6 +186,8 @@ XChangeDeviceControl(dpy, dev, control, d)
 return NoSuchExtension;
 }
 else {
+UnlockDisplay(dpy);
+SyncHandle();
 return rep.status;
 }
 }
@@ -200,6 +209,8 @@ XChangeDeviceControl(dpy, dev, control, d)
 return NoSuchExtension;
 }
 else {
+UnlockDisplay(dpy);
+SyncHandle();
 return rep.status;
 }
 }

commit 7f1b5257b7eb0c873988c33453c110fc5f9996dd
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Wed Aug 1 01:59:17 2007 +0300

Bump to 1.1.2

diff --git a/configure.ac b/configure.ac
index 1044ec2..2641313 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
 
-AC_INIT(libXi, 1.1.1, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
+AC_INIT(libXi, 1.1.2, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 

commit 257345a0500ef0b7cf8e56f19a8bf93721408673
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Wed Aug 1 01:37:05 2007 +0300

DevicePresenceNotify: Don't make non-static function, static

I wish that there was a better way to do this, but c'est la vie.  It's our
exposed API, so we've just got to deal for now.

diff --git a/src/XExtInt.c b/src/XExtInt.c
index 8366104..10f728d 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -259,7 +259,7 @@ Ones(mask)
 return (((y + (y  3))  030707070707) % 077);
 }
 
-static int
+int
 _XiGetDevicePresenceNotifyEvent(Display * dpy)
 {
 XExtDisplayInfo *info 

libxi: Changes to 'upstream-unstable'

2007-07-05 Thread Julien Cristau
 configure.ac   |2 +-
 man/XGrabDeviceKey.man |1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 9d0aa39742a0d1d4221ad4104708b0f8f60c14c7
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Thu Jul 5 10:47:45 2007 +0930

Bump to version 1.1.1.

diff --git a/configure.ac b/configure.ac
index d443194..1044ec2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
 
-AC_INIT(libXi, 1.1.0, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
+AC_INIT(libXi, 1.1.1, 
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 

commit ddc3b9cbbcc892a48dce2bd441e6d404cd44d943
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Wed Jun 13 15:36:01 2007 +0930

Bug 9657: Bad markup on XGrabDeviceKey.3x

https://bugs.freedesktop.org/show_bug.cgi?id=9657

diff --git a/man/XGrabDeviceKey.man b/man/XGrabDeviceKey.man
index 1284f37..0475c29 100644
--- a/man/XGrabDeviceKey.man
+++ b/man/XGrabDeviceKey.man
@@ -17,7 +17,6 @@
 .SH NAME
 XGrabDeviceKey, XUngrabDeviceKey \- grab/ungrab extension input device Keys
 .SH SYNTAX
-.SP
 .HP
 int XGrabDeviceKey\^(\^Display *\fIdisplay\fP\^, XDevice *\fIdevice\fP\^,
 unsigned int \fIKey\fP\^, unsigned int \fImodifiers\fP\^, XDevice


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



libxi: Changes to 'upstream-unstable'

2007-01-23 Thread David Nusinow
New branch 'upstream-unstable' available with the following commits:
commit c8696a5230c565f8999fea136a85a875b04e7b9a
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Wed Dec 6 18:56:56 2006 +0200

Makefile.am: make ChangeLog hook safer

Make ChangeLog hook as safe as possible.

commit 60dccd9a7be95e35b4b8c90934888efedfde84cc
Author: Jamey Sharp [EMAIL PROTECTED]
Date:   Sun Nov 19 01:04:26 2006 -0800

Bug #8663: _XiCheckExtInit must drop the Display lock in all error cases.

commit 41710257257939b181a1615937610550b40621b9
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Wed Nov 8 16:19:58 2006 +0200

DevicePresenceNotify: remove verbosity, fill out all fields
Don't throw a printf every time we get a DPN, and fill in all the fields
when copying the structure.

commit eeebae55766bd4c0121479a7b7188d6a0545f66c
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Sat Oct 21 12:08:21 2006 +0300

re-enable iscore in DEVICE_CORE, re-enable DEVICE_ENABLE

commit 50c88082ba2ee4785f4beaa351f2b772f1a381ad
Author: Zephaniah E. Hull [EMAIL PROTECTED]
Date:   Sat Oct 21 04:01:46 2006 -0400

Comment out DEVICE_ENABLE, and use of iscore in the DEVICE_CORE control.
(We now compile again.)

Track the DEVICE_TOUCHSCREEN - DEVICE_ABS_CALIB and new DEVICE_ABS_AREA
changes to the input protocol.

commit 2a3f042241bb63601f5745f397bb1b66ecc5a592
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Fri Oct 20 00:39:50 2006 +0300

add DEVICE_ENABLE control, add iscore to DEVICE_CORE

Add DEVICE_ENABLE for enabling/disabling devices, and an 'iscore'
flag to DEVICE_CORE that specifies whether or not the device is a
virtual core device.

commit c27e00ceceed3fea011c98c0e70ab568bf0687c6
Author: Jamey Sharp [EMAIL PROTECTED]
Date:   Sun Oct 15 00:26:21 2006 -0700

Don't call XInput_find_display in _XiCheckExtInit, while the Display lock 
is held.

All callers of _XiCheckExtInit have already called XInput_find_display
first outside the lock, so just pass their copy of the XExtDisplayInfo
structure down. Besides being more correct, this should be slightly
faster. :-)

Thanks to Magnus Kessler [EMAIL PROTECTED] for identifying
the bug and proposing a workaround.

commit 5dda1e1509d40ef64ebc816ce538cef462a4fa51
Author: Jamey Sharp [EMAIL PROTECTED]
Date:   Sun Oct 15 00:03:57 2006 -0700

Don't call XInput_find_display in _XiGetExtensionVersion, while the Display 
lock is held.

_XiGetExtensionVersion has two callers. One had already called
XInput_find_display, and the other could easily do so outside the
Display lock. So I change the _XiGetExtensionVersion interface to
accept a previously-computed XExtDisplayInfo from the caller.
Besides being more correct, this should be slightly faster. :-)

Thanks to Magnus Kessler [EMAIL PROTECTED] for identifying
the bug and proposing a workaround.

commit 8e317d390d1ef8f2c072957355b5d71db3b89c43
Author: Jamey Sharp [EMAIL PROTECTED]
Date:   Sat Oct 14 23:56:20 2006 -0700

Add *.o to .gitignore.

commit 6e08a76fd8e356f98d2d6913f0c1b1401090768d
Merge: ba84e84575b4167b0c6298e86a860b0741e2d2a3 
360ceacb2a3cbad1652d1b02d79b24469db2980a
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Sun Sep 24 20:02:24 2006 +0300

Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/lib/libXi

commit ba84e84575b4167b0c6298e86a860b0741e2d2a3
Merge: 93d3c2c45ccd9a806342746c4df33c684a284dd6 
576c5794cf4b786dfc183c9b6f0a387cad4a5460
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Sun Sep 24 19:58:56 2006 +0300

Merge branch 'input-hotplug'

commit 360ceacb2a3cbad1652d1b02d79b24469db2980a
Author: Drew Parsons [EMAIL PROTECTED]
Date:   Mon Aug 14 14:10:52 2006 -0700

Bug 7855/Patch 6530: incorrect manpage section suffix

Bug 7855 https://bugs.freedesktop.org/show_bug.cgi?id=7855
Patch 6530 https://bugs.freedesktop.org/attachment.cgi?id=6530
Based on patch by Fabio M. Di Nitto c/- Colin Watson, Debian Bug#377204.

commit 576c5794cf4b786dfc183c9b6f0a387cad4a5460
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Tue Jul 18 11:46:02 2006 -0400

bump version to 1.1.0, require inputproto 1.4
Bump the version to 1.1.0, and make sure we build with inputproto 1.4,
for the DEVICE_{TOUCHSCREEN,CORE} controls, and DevicePresenceNotify.

commit b22d8d0e1519d3f86474f4a79f3c4b27b46c662a
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Tue Jul 18 11:45:07 2006 -0400

add DevicePresenceNotify event
Add a DevicePresenceNotify event, which notes that something about the
device list changed.

commit 878d9e76764d27f5af861817b46b2caf2d89d7c4
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Tue Jul 18 11:43:24 2006 -0400

add sensible DEVICE_TOUCHSCREEN and DEVICE_CORE controls
Add a more sensible DEVICE_TOUCHSCREEN control, which allows you to
clip the x and y values.
Add a DEVICE_CORE control, which toggles the sending of core events
by