[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libxi: Changes to 'ubuntu'



 debian/changelog                                     |    7 ++
 debian/patches/0001_fix_button_mask_and_labels.patch |   59 +++++++++++++++++++
 debian/patches/series                                |    2 
 3 files changed, 67 insertions(+), 1 deletion(-)

New commits:
commit 29ef7a1b0963cec232a7f37ef18357cd2f031eb3
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Thu Apr 12 09:39:03 2012 -0700

    releasing version 2:1.6.0-0ubuntu2

diff --git a/debian/changelog b/debian/changelog
index a33d2f9..63316f8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-libxi (2:1.6.0-0ubuntu2) UNRELEASED; urgency=low
+libxi (2:1.6.0-0ubuntu2) precise; urgency=low
 
   * Report button state and labels correctly (LP: #980041)
     - Add patch 0001_fix_button_mask_and_labels.patch from upstream
 
- -- Chase Douglas <chase.douglas@ubuntu.com>  Thu, 12 Apr 2012 09:16:00 -0700
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Thu, 12 Apr 2012 09:30:18 -0700
 
 libxi (2:1.6.0-0ubuntu1) precise; urgency=low
 

commit 9c555d94c8438e797d8f76f8789dbdebaaa080b3
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Thu Apr 12 09:30:10 2012 -0700

    Report button state and labels correctly (LP: #980041)
    
    * Report button state and labels correctly (LP: #980041)
      - Add patch 0001_fix_button_mask_and_labels.patch from upstream

diff --git a/debian/changelog b/debian/changelog
index 3eb679d..a33d2f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libxi (2:1.6.0-0ubuntu2) UNRELEASED; urgency=low
+
+  * Report button state and labels correctly (LP: #980041)
+    - Add patch 0001_fix_button_mask_and_labels.patch from upstream
+
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Thu, 12 Apr 2012 09:16:00 -0700
+
 libxi (2:1.6.0-0ubuntu1) precise; urgency=low
 
   * New upstream release
diff --git a/debian/patches/0001_fix_button_mask_and_labels.patch b/debian/patches/0001_fix_button_mask_and_labels.patch
new file mode 100644
index 0000000..91a4447
--- /dev/null
+++ b/debian/patches/0001_fix_button_mask_and_labels.patch
@@ -0,0 +1,59 @@
+From 8436c920953f288aea2d6d5f370f8eaaaef82d97 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu, 15 Mar 2012 11:51:41 +1000
+Subject: [PATCH] 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 <peter.hutterer@who-t.net>
+Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
+---
+ src/XExtInt.c |   10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/XExtInt.c b/src/XExtInt.c
+index 89c0894..0c64f9a 100644
+--- a/src/XExtInt.c
++++ b/src/XExtInt.c
+@@ -1610,12 +1610,14 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int *nclasses)
+                     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 +1625,14 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int *nclasses)
+                     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++;
+ 
+-- 
+1.7.9.1
+
diff --git a/debian/patches/series b/debian/patches/series
index fdffa2a..250f656 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-# placeholder
+0001_fix_button_mask_and_labels.patch


Reply to: