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

libxi: Changes to 'debian-experimental'



 debian/changelog                                 |    4 ++
 debian/patches/0001_scroll_increment_value.patch |   34 +++++++++++++++++++++++
 debian/patches/series                            |    2 -
 3 files changed, 38 insertions(+), 2 deletions(-)

New commits:
commit 5a156117ffee21ae62e53fde6250b512b306fee6
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Mar 7 14:20:22 2012 -0800

    Fix scroll valuator increment value on 32-bit machines
    
    * Fix scroll valuator increment value on 32-bit machines
      - Added 0001_scroll_increment_value.patch

diff --git a/debian/changelog b/debian/changelog
index 91085fc..542e326 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ libxi (2:1.5.99.3-1) UNRELEASED; urgency=low
 
   * New upstream release candidate
   * Bump build deps on x11proto-input-dev
+  * Fix scroll valuator increment value on 32-bit machines
+    - Added 0001_scroll_increment_value.patch
 
- -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 10 Feb 2012 22:49:23 +0100
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Wed, 07 Mar 2012 14:18:45 -0800
 
 libxi (2:1.5.99.2-1) experimental; urgency=low
 
diff --git a/debian/patches/0001_scroll_increment_value.patch b/debian/patches/0001_scroll_increment_value.patch
new file mode 100644
index 0000000..4c12f18
--- /dev/null
+++ b/debian/patches/0001_scroll_increment_value.patch
@@ -0,0 +1,34 @@
+From 2a31d05ade5a37eac7874f3d118fda80f2fa074c Mon Sep 17 00:00:00 2001
+From: Chase Douglas <chase.douglas@canonical.com>
+Date: Wed, 7 Mar 2012 14:09:17 -0800
+Subject: [PATCH] Use unsigned long long for double fractional calculation
+
+This fixes scroll class increment values on 32-bit machines. Performing
+1UL << 32 shifts the bit off the end of a 32-bit unsigned long value. By
+expanding to 1ULL, we have the full 64-bits of an unsigned long long
+including on 32-bit machines.
+
+Before this change, xinput list --long would output scroll increment
+values of -nan.
+
+Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+---
+ src/XExtInt.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/XExtInt.c b/src/XExtInt.c
+index 7694f06..89c0894 100644
+--- a/src/XExtInt.c
++++ b/src/XExtInt.c
+@@ -1695,7 +1695,7 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int *nclasses)
+                     cls_lib->scroll_type= cls_wire->scroll_type;
+                     cls_lib->flags      = cls_wire->flags;
+                     cls_lib->increment  = cls_wire->increment.integral;
+-                    cls_lib->increment += (unsigned int)cls_wire->increment.frac/(double)(1UL << 32);
++                    cls_lib->increment += (unsigned int)cls_wire->increment.frac/(double)(1ULL << 32);
+ 
+                     to->classes[cls_idx++] = any_lib;
+                 }
+-- 
+1.7.9
+
diff --git a/debian/patches/series b/debian/patches/series
index 9bf2d52..b58d4b7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-# placeholder.
+0001_scroll_increment_value.patch


Reply to: