From owner-cvs-all Sun Jul 8 13:24: 5 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 239A337B401; Sun, 8 Jul 2001 13:24:00 -0700 (PDT) (envelope-from iedowse@FreeBSD.org) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f68KO0Z87485; Sun, 8 Jul 2001 13:24:00 -0700 (PDT) (envelope-from iedowse) Message-Id: <200107082024.f68KO0Z87485@freefall.freebsd.org> From: Ian Dowse Date: Sun, 8 Jul 2001 13:23:59 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.sbin/moused moused.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG iedowse 2001/07/08 13:23:59 PDT Modified files: usr.sbin/moused moused.c Log: The state machine for 3-button emulation defers some button events until a 20ms select(2) timeout occurs, but if there is a continuous stream of movement events, button events can be delayed indefinitely because the select never has to wait long enough for a timeout. The delay and mouse event reordering that result are very noticable and sometimes quite frustrating when dragging windows etc. in X. Add a simple mechanism that avoids this re-ordering. While a button event is deferred, we discard up to 3 movement events to allow for mouse jitter. If more movement events occur, then we immediately timeout the deferred button event and let the movement proceed. This change only affects the 3-button emulation case. Revision Changes Path 1.51 +30 -5 src/usr.sbin/moused/moused.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message