xserver-xorg-input-mouse: Changes to 'debian-unstable'
debian/changelog | 7 +++++++
src/hurd_mouse.c | 9 ++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
New commits:
commit 2189038cba7b9259a4a897e46c8396f61fb6d73d
Author: Cyril Brulebois <kibi@debian.org>
Date: Thu Feb 17 23:04:36 2011 +0100
Upload to unstable.
diff --git a/debian/changelog b/debian/changelog
index f531303..cb39149 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-xserver-xorg-input-mouse (1:1.6.0-3) UNRELEASED; urgency=low
+xserver-xorg-input-mouse (1:1.6.0-3) unstable; urgency=low
* Cherry-pick from upstream, thanks to Samuel Thibault:
- Fix mouse data buffering
- -- Cyril Brulebois <kibi@debian.org> Thu, 17 Feb 2011 23:03:40 +0100
+ -- Cyril Brulebois <kibi@debian.org> Thu, 17 Feb 2011 23:04:17 +0100
xserver-xorg-input-mouse (1:1.6.0-2) unstable; urgency=low
commit 9f886747e6b481455105423b46711b6ab509b6bd
Author: Cyril Brulebois <kibi@debian.org>
Date: Thu Feb 17 23:04:15 2011 +0100
Document the cherry-pick.
diff --git a/debian/changelog b/debian/changelog
index 812ffea..f531303 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-input-mouse (1:1.6.0-3) UNRELEASED; urgency=low
+
+ * Cherry-pick from upstream, thanks to Samuel Thibault:
+ - Fix mouse data buffering
+
+ -- Cyril Brulebois <kibi@debian.org> Thu, 17 Feb 2011 23:03:40 +0100
+
xserver-xorg-input-mouse (1:1.6.0-2) unstable; urgency=low
* Switch to dh:
commit 290afd625aec351037500b6a76913dd6fe60dfe1
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sun Sep 5 21:20:33 2010 +0200
Fix mouse data buffering
Check remaining buffer size *before* reading a character from the device. Also
keep extra characters in the static buffer until next invocation.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
(cherry picked from commit 35f277a718f2da6a09080af020aaf29ef96fe807)
diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
index 4dac225..3008d28 100644
--- a/src/hurd_mouse.c
+++ b/src/hurd_mouse.c
@@ -86,6 +86,7 @@ OsMouseReadInput(InputInfoPtr pInfo)
{
MouseDevPtr pMse;
static kd_event eventList[NUMEVENTS];
+ static int remainder = 0;
int n, c;
kd_event *event = eventList;
unsigned char *pBuf;
@@ -94,13 +95,14 @@ OsMouseReadInput(InputInfoPtr pInfo)
XisbBlockDuration(pMse->buffer, -1);
pBuf = (unsigned char *)eventList;
- n = 0;
- while ((c = XisbRead(pMse->buffer)) >= 0 && n < sizeof(eventList))
+ n = remainder;
+ while (n < sizeof(eventList) && (c = XisbRead(pMse->buffer)) >= 0)
pBuf[n++] = (unsigned char)c;
- if (n == 0)
+ if (n == remainder)
return;
+ remainder = n % sizeof(kd_event);
n /= sizeof(kd_event);
while( n-- ) {
int buttons = pMse->lastButtons;
@@ -126,6 +128,7 @@ OsMouseReadInput(InputInfoPtr pInfo)
pMse->PostEvent(pInfo, buttons, dx, dy, 0, 0);
++event;
}
+ memcpy(eventList, event, remainder);
return;
}
Reply to: