public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Osterlund <petero2@telia.com>
To: linux-kernel@vger.kernel.org
Cc: Dmitry Torokhov <dtor_core@ameritech.net>,
	Vojtech Pavlik <vojtech@suse.cz>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH 1/4] Make mousedev.c report all events to user space immediately
Date: 30 Jan 2005 11:31:26 +0100	[thread overview]
Message-ID: <m34qgz9pj5.fsf@telia.com> (raw)

mousedev_packet() incorrectly clears list->ready when called with
"tail == head - 1".  The effect is that the last mouse event from the
hardware isn't reported to user space until another hardware mouse
event arrives.  This can make the left mouse button get stuck when
tapping on a touchpad.  When this happens, the button doesn't unstick
until the next time you interact with the touchpad.

Signed-off-by: Peter Osterlund <petero2@telia.com>
---

 linux-petero/drivers/input/mousedev.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/input/mousedev.c~mousedev-ready-fix drivers/input/mousedev.c
--- linux/drivers/input/mousedev.c~mousedev-ready-fix	2005-01-30 03:06:49.000000000 +0100
+++ linux-petero/drivers/input/mousedev.c	2005-01-30 03:06:49.000000000 +0100
@@ -467,10 +467,10 @@ static void mousedev_packet(struct mouse
 	}
 
 	if (!p->dx && !p->dy && !p->dz) {
-		if (list->tail != list->head)
-			list->tail = (list->tail + 1) % PACKET_QUEUE_LEN;
 		if (list->tail == list->head)
 			list->ready = 0;
+		else
+			list->tail = (list->tail + 1) % PACKET_QUEUE_LEN;
 	}
 
 	spin_unlock_irqrestore(&list->packet_lock, flags);
_

-- 
Peter Osterlund - petero2@telia.com
http://web.telia.com/~u89404340

             reply	other threads:[~2005-01-30 10:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-30 10:31 Peter Osterlund [this message]
2005-01-30 10:33 ` [PATCH 2/4] Enable hardware tapping for ALPS touchpads Peter Osterlund
2005-01-30 10:35   ` [PATCH 3/4] Fix "pointer jumps to corner of screen" problem on ALPS Glidepoint touchpads Peter Osterlund
2005-01-30 10:36     ` [PATCH 4/4] Add support for Synaptics touchpad scroll wheels Peter Osterlund
2005-02-04 13:20       ` Vojtech Pavlik
2005-02-03 11:18     ` [PATCH 3/4] Fix "pointer jumps to corner of screen" problem on ALPS Glidepoint touchpads Giuseppe Bilotta
2005-02-03 22:06       ` Peter Osterlund
2005-02-04 13:19     ` Vojtech Pavlik
2005-02-04 13:16 ` [PATCH 1/4] Make mousedev.c report all events to user space immediately Vojtech Pavlik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m34qgz9pj5.fsf@telia.com \
    --to=petero2@telia.com \
    --cc=akpm@osdl.org \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox