From owner-freebsd-x11@FreeBSD.ORG Fri Nov 21 14:25:52 2014 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A455C0A for ; Fri, 21 Nov 2014 14:25:52 +0000 (UTC) Received: from mail.palmen-it.de (stef.palmen-it.de [IPv6:2a01:198:49d:1::1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EC48827 for ; Fri, 21 Nov 2014 14:25:52 +0000 (UTC) Received: from dslb-084-056-246-061.084.056.pools.vodafone-ip.de ([84.56.246.61] helo=[192.168.98.102]) by mail.palmen-it.de with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xrp9g-0004y7-MX for freebsd-x11@freebsd.org; Fri, 21 Nov 2014 14:25:48 +0000 Message-ID: <546F4B6B.9040604@palmen-it.de> Date: Fri, 21 Nov 2014 15:25:47 +0100 From: Felix Palmen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: freebsd-x11@freebsd.org Subject: Horizontal scrolling through moused /dev/sysmouse, patch Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 84.56.246.61 X-SA-Exim-Rcpt-To: freebsd-x11@freebsd.org X-SA-Exim-Mail-From: felix@palmen-it.de X-SA-Exim-Scanned: No (on mail.palmen-it.de); SAEximRunCond expanded to false X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2014 14:25:52 -0000 Hello all, I had a hard time getting horizontal scrolling working with moused and xf86-input-mouse 1.9.0, the patch from https://wiki.freebsd.org/SynapticsTouchpad seems outdated. The following extended patch works for me: --- xf86-input-mouse-1.9.0.orig/src/mouse.c 2014-11-21 15:12:35.000000000 +0100 +++ xf86-input-mouse-1.9.0/src/mouse.c 2014-11-21 15:10:02.000000000 +0100 @@ -969,7 +969,11 @@ for (i = 0; i < MSE_MAXBUTTONS; i++) pMse->buttonMap[i] = 1 << (i > 2 && i < MSE_MAXBUTTONS-4 ? i+4 : i); pMse->hasZ = 1; - pMse->hasW = 0; + if (device && strncmp(device, "/dev/sysmouse", 13) == 0) { + pMse->hasW = 1; + } else { + pMse->hasW = 0; + } protocol = MousePickProtocol(pInfo, device, protocol, &protocolID); @@ -1611,6 +1615,13 @@ */ dz = ((signed char)(pBuf[5] << 1) + (signed char)(pBuf[6] << 1)) >> 1; + if (dz == 2) { + dw = 1; + dz = 0; + } else if (dz == -2) { + dw = -1; + dz = 0; + } buttons |= (int)(~pBuf[7] & 0x7f) << 3; } break; What do you think? Ugly hack? Is there a way to determine whether moused actually handles a fourth axis, to avoid setting hasW=1 when there is none?