Hello community,

here is the log from the commit of package libXi for openSUSE:Factory checked 
in at 2012-05-09 18:17:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libXi (Old)
 and      /work/SRC/openSUSE:Factory/.libXi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libXi", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/libXi/libXi.changes      2012-05-08 
11:58:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libXi.new/libXi.changes 2012-05-09 
18:31:58.000000000 +0200
@@ -1,0 +2,9 @@
+Wed May  9 08:43:58 UTC 2012 - [email protected]
+
+- Update to version 1.6.1:
+  + Major bugs fixed:
+    - wrong button and mask copy
+    - raw event sourceid is now set
+  + Small cleanups and bug fixes.
+
+-------------------------------------------------------------------

Old:
----
  libXi-1.6.0.tar.bz2

New:
----
  libXi-1.6.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libXi.spec ++++++
--- /var/tmp/diff_new_pack.YP0fMC/_old  2012-05-09 18:32:00.000000000 +0200
+++ /var/tmp/diff_new_pack.YP0fMC/_new  2012-05-09 18:32:00.000000000 +0200
@@ -18,7 +18,7 @@
 
 Name:           libXi
 %define lname  libXi6
-Version:        1.6.0
+Version:        1.6.1
 Release:        0
 Summary:        X Input Extension library
 License:        MIT

++++++ libXi-1.6.0.tar.bz2 -> libXi-1.6.1.tar.bz2 ++++++
++++ 13919 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libXi-1.6.0/ChangeLog new/libXi-1.6.1/ChangeLog
--- old/libXi-1.6.0/ChangeLog   2012-03-08 07:07:35.000000000 +0100
+++ new/libXi-1.6.1/ChangeLog   2012-05-03 08:12:39.000000000 +0200
@@ -1,3 +1,82 @@
+commit ae163b6202d844a46541928d00049b29cbdf930f
+Author: Peter Hutterer <[email protected]>
+Date:   Thu May 3 16:01:35 2012 +1000
+
+    libXi 1.6.1
+    
+    Signed-off-by: Peter Hutterer <[email protected]>
+
+commit fd5e000308925f703ecd15c288127ab33a456425
+Author: Peter Hutterer <[email protected]>
+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 <[email protected]>
+    Reviewed-by: Jeremy Huddleston <[email protected]>
+
+commit f8f44f42eb543ecd944a84facba6c09bf48e7711
+Author: Chase Douglas <[email protected]>
+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 <[email protected]>
+    Signed-off-by: Peter Hutterer <[email protected]>
+
+commit 2ac185d2fd2b884f4f59a7f7f61f414d139859aa
+Author: Peter Hutterer <[email protected]>
+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 <[email protected]>
+    Reviewed-by: Chase Douglas <[email protected]>
+
+commit dfc101e4c6cdac4ff9a51732b2754287fbdc8582
+Author: Peter Hutterer <[email protected]>
+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 <[email protected]>
+    Reviewed-by: Chase Douglas <[email protected]>
+
+commit 8436c920953f288aea2d6d5f370f8eaaaef82d97
+Author: Peter Hutterer <[email protected]>
+Date:   Thu Mar 15 11:51:41 2012 +1000
+
+    Fix wrong button label and mask copy on OS X
+    
+    Regression introduced in c1a5a70b51f12dedf354102217c7cd4247ed3a4b.
+    
+    If double-padding is applied, the length of the mask on the wire may be
+    smaller than libXi's mask_len. When copying, only the wire length must be
+    copied, with the remainder set to 0.
+    When advancing to the button labels, the wire length matters, not libXi's
+    internal length.
+    
+    Signed-off-by: Peter Hutterer <[email protected]>
+    Reviewed-by: Jeremy Huddleston <[email protected]>
+    Tested-by: Jeremy Huddleston <[email protected]>
+
 commit 70b730b0548ca9e408f14f2576b972beb32a0ad0
 Author: Peter Hutterer <[email protected]>
 Date:   Thu Mar 8 16:03:50 2012 +1000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libXi-1.6.0/configure.ac new/libXi-1.6.1/configure.ac
--- old/libXi-1.6.0/configure.ac        2012-03-08 07:03:42.000000000 +0100
+++ new/libXi-1.6.1/configure.ac        2012-05-03 08:01:30.000000000 +0200
@@ -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])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libXi-1.6.0/man/XIQueryVersion.man new/libXi-1.6.1/man/XIQueryVersion.man
--- old/libXi-1.6.0/man/XIQueryVersion.man      2011-09-23 00:16:33.000000000 
+0200
+++ new/libXi-1.6.1/man/XIQueryVersion.man      2012-04-23 07:08:36.000000000 
+0200
@@ -2,12 +2,12 @@
 .\"     Title: xiqueryversion
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 09/23/2011
+.\"      Date: 04/23/2012
 .\"    Manual: [FIXME: manual]
 .\"    Source: [FIXME: source]
 .\"  Language: English
 .\"
-.TH "XIQUERYVERSION" "libmansuffix" "09/23/2011" "[FIXME: source]" "[FIXME: 
manual]"
+.TH "XIQUERYVERSION" "libmansuffix" "04/23/2012" "[FIXME: source]" "[FIXME: 
manual]"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -86,6 +86,19 @@
 .fi
 .if n \{\
 .RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+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\&.
+.fi
+.if n \{\
+.RE
 .\}
 .sp
 .if n \{\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libXi-1.6.0/man/XIQueryVersion.txt new/libXi-1.6.1/man/XIQueryVersion.txt
--- old/libXi-1.6.0/man/XIQueryVersion.txt      2010-09-07 07:21:04.000000000 
+0200
+++ new/libXi-1.6.1/man/XIQueryVersion.txt      2012-04-23 07:06:40.000000000 
+0200
@@ -42,8 +42,12 @@
    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
 --------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libXi-1.6.0/src/XExtInt.c new/libXi-1.6.1/src/XExtInt.c
--- old/libXi-1.6.0/src/XExtInt.c       2012-03-08 05:01:33.000000000 +0100
+++ new/libXi-1.6.1/src/XExtInt.c       2012-04-23 07:06:40.000000000 +0200
@@ -145,7 +145,7 @@
 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
@@ -344,6 +344,43 @@
     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 @@
     register int        version_index,
     XExtDisplayInfo    *info)
 {
-    XExtensionVersion *ext;
-
     if (!XInputCheckExtension(dpy, info)) {
        UnlockDisplay(dpy);
        return (-1);
@@ -374,15 +409,11 @@
            _XiGetExtensionVersion(dpy, "XInputExtension", info);
     }
 
-    if (versions[version_index].major_version > Dont_Check) {
-       ext = ((XInputData *) info->data)->vers;
-       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))) {
-           UnlockDisplay(dpy);
-           return (-1);
-       }
+    if (_XiCheckVersion(info, version_index) < 0) {
+       UnlockDisplay(dpy);
+       return -1;
     }
+
     return (0);
 }
 
@@ -403,7 +434,16 @@
        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
@@ -981,7 +1021,7 @@
         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);
@@ -1610,12 +1650,14 @@
                     int struct_size;
                     int state_size;
                     int labels_size;
+                    int wire_mask_size;
 
                     cls_wire = (xXIButtonInfo*)any_wire;
                     sizeXIButtonClassType(cls_wire->num_buttons,
                                           &struct_size, &state_size,
                                           &labels_size);
                     cls_lib = next_block(&ptr_lib, struct_size);
+                    wire_mask_size = ((cls_wire->num_buttons + 7)/8 + 3)/4 * 4;
 
                     cls_lib->type = cls_wire->type;
                     cls_lib->sourceid = cls_wire->sourceid;
@@ -1623,10 +1665,14 @@
                     cls_lib->state.mask_len = state_size;
                     cls_lib->state.mask = next_block(&ptr_lib, state_size);
                     memcpy(cls_lib->state.mask, &cls_wire[1],
-                           cls_lib->state.mask_len);
+                           wire_mask_size);
+                    if (state_size != wire_mask_size)
+                        memset(&cls_lib->state.mask[wire_mask_size], 0,
+                               state_size - wire_mask_size);
 
                     cls_lib->labels = next_block(&ptr_lib, labels_size);
-                    atoms =(uint32_t*)((char*)&cls_wire[1] + 
cls_lib->state.mask_len);
+
+                    atoms =(uint32_t*)((char*)&cls_wire[1] + wire_mask_size);
                     for (j = 0; j < cls_lib->num_buttons; j++)
                         cls_lib->labels[j] = *atoms++;
 
@@ -1795,14 +1841,13 @@
 }
 
 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 */
@@ -1820,9 +1865,14 @@
     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);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libXi-1.6.0/src/XIint.h new/libXi-1.6.1/src/XIint.h
--- old/libXi-1.6.0/src/XIint.h 2011-12-21 06:40:23.000000000 +0100
+++ new/libXi-1.6.1/src/XIint.h 2012-03-26 01:02:59.000000000 +0200
@@ -26,6 +26,7 @@
 extern XExtDisplayInfo *XInput_find_display(Display *);
 
 extern int _XiCheckExtInit(Display *, int, XExtDisplayInfo *);
+extern int _XiCheckVersion(XExtDisplayInfo *info, int version_index);
 
 extern XExtensionVersion *_XiGetExtensionVersion(Display *, _Xconst char *, 
XExtDisplayInfo *);
 extern XExtensionVersion* _XiGetExtensionVersionRequest(Display *dpy, _Xconst 
char *name, int xi_opcode);

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to