Date: Fri, 21 Nov 2014 15:25:47 +0100 From: Felix Palmen <felix@palmen-it.de> To: freebsd-x11@freebsd.org Subject: Horizontal scrolling through moused /dev/sysmouse, patch Message-ID: <546F4B6B.9040604@palmen-it.de>
next in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?546F4B6B.9040604>