From owner-freebsd-current@FreeBSD.ORG Fri Jun 15 09:56:54 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3A8416A46B for ; Fri, 15 Jun 2007 09:56:54 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 2176F13C469 for ; Fri, 15 Jun 2007 09:56:53 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (burahs@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l5F9ulhj067287; Fri, 15 Jun 2007 11:56:52 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l5F9ulsc067286; Fri, 15 Jun 2007 11:56:47 +0200 (CEST) (envelope-from olli) Date: Fri, 15 Jun 2007 11:56:47 +0200 (CEST) Message-Id: <200706150956.l5F9ulsc067286@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG, h.schmalzbauer@omnisec.de In-Reply-To: <200706151055.01446.h.schmalzbauer@omnisec.de> X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 15 Jun 2007 11:56:52 +0200 (CEST) X-Mailman-Approved-At: Fri, 15 Jun 2007 11:35:55 +0000 Cc: Subject: Re: moused linear acceleration drops X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2007 09:56:54 -0000 Harald Schmalzbauer wrote: > Oliver Fromme wrote: > > My patch only added -A (dynamic acc) but did not touch the > > algorithm of -a (linear acc). If you observe the problem > > when using -a but not -A, then there are two possibilities: > > > > 1. My patch _did_ introduce a regression with -a, or: > > 2. The problem already existed before my patch. > > I suspect the latter. Me too. The old (unpatched) code looks like this: mouse.u.data.x = action2.dx * rodent.accelx; mouse.u.data.y = action2.dy * rodent.accely; The accelx and accely variables are floats, all others are integers, so the result is rounded down. If the mouse reports 1 unit of movement, you get 1 * 0.333 rounded down, which is 0, so no movement is reported to X11. Even two units (2 * 0.333) get rounded down to zero. So you have to have at least three units to get any pointer movement at all. The proper fix would be to accumulate the rounding errors and take them into account at the next movement. Should be easy to fix. "I'll look at it." (BTW, I also verified that moused still uses the exact same code if the -A option isn't used, so it's not a regression of my patch. *phew* :) > > By the way, what kind or model of a mouse do you have > > there? Maybe I'm able to get hold of one, so I can > > reproduce the problem more easily. The most sensitive > > mouse in my collection seems to have only 600 dpi. > > It's a Saitek Laser mouse. I checked these for polished surfaces and it's even > working on glass if you stick some milky sheet _under_ the glass, which > doesn't destroy the clean surface optic. (btw, the logitech laser mice didn't > work on the described glass table!) > I have one spare in stock, I can put it in your letter box if I'm downtown > next time (planned for this afternoon, but weather forecast predicts hail.... > so not sure) See my private mail. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Being really good at C++ is like being really good at using rocks to sharpen sticks." -- Thant Tessman