From nobody Fri Sep 06 18:35:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X0lK75py1z5VSCl; Fri, 06 Sep 2024 18:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0lK73CfWz4W2x; Fri, 6 Sep 2024 18:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725647723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4GPeLNGwVptWUwbYD6083l/cCxlc+rBLkggcn1CNGPo=; b=l5UNIyvMFQKs+Fo6IPv5x7giqlxE+mWyXT1WKQm6MLWCOjjgyOE68sFtjucFw5Rc92AaM+ BUDaoL0aIVIWbkAGLANlBdaBsv+lxmkTZa7PUbueIgS/c7SuLTnypzyvJ7RHN7SdkO7s5v ERBiPGQAP5F/QRsv84A0mIgBi6537WqOxkdrp+0/v6EhPz2hIK6CXmygDA5PpJEsGGeym4 60BHrK30Zq4CTrwrOtdzG7f3dT4p6wHcJ9Gta+t7nDfHCKBnEy78OgD3tTEck/hodqsmCb /ds23wjJ7iGeXfwjaxfqsyP9ZdFh/NWEgtlxFImipRXWZ+S7LRiBxDc8UPuMPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725647723; a=rsa-sha256; cv=none; b=mkKE8tykvgpPwE0ejL4QVOJKdKbG1vT0Uk2uFEFGvakd2Tn95Ws+JdaauSCs++VSngRbmd XZMXt6HAUduRMIFPSbZQXkHCFt/+KWh4xL+X7dtb4G7N43ChxrgzjvPTl9ZnaUN+V7xU9V eVXXEbB+6yfimGnhxJjiNfTLANLngU6KsxfDWy3u3vi6jQukfuixYFDMFULmd2XxomfewJ ReeVym1AtoTyUWhi7iyEbga3CWxkZ7XdD9dV9ndiUC+DErgKIKuFDAbKvLZrqc8qN+UBYx jl4odbR/qC8DZks/MsSeDhYpCTX89xeG6HL3Z2Oll4f5u519xiB60s89ncVkAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725647723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4GPeLNGwVptWUwbYD6083l/cCxlc+rBLkggcn1CNGPo=; b=ggVC8A6EbUxZNpioYCZMOVZmyzyaq3Ed1d3et3qUV2EBxmBU4oiD1uNks03nSyM7/Dyj3H CirX3Eb3+AWVDoAY2hWunu+Jbkkv2EnH+PaerLNj0Kg2jzOcVt6CxSiLDld3uhtePr54Op gaHoF+M5Y06wcOB1x2Fo+mmTa6ymDx4+YRssS9CahABddd+Lw8HNf6Xa1TBwVlp4XWzEFK wwbVrjMHK3o/w4bRPdUoafPVvXXP8Vx7k6PzvILFB+eNuftY7ygcYhx9NSatnvbv5bfIvU FYjgCHeb9/84MaaVCl346bJ0uEsnw9TBFTG/KC1PryLgCP4oFsatWMzmSuEIvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X0lK72qTdz135G; Fri, 6 Sep 2024 18:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 486IZNSZ011306; Fri, 6 Sep 2024 18:35:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 486IZNPj011303; Fri, 6 Sep 2024 18:35:23 GMT (envelope-from git) Date: Fri, 6 Sep 2024 18:35:23 GMT Message-Id: <202409061835.486IZNPj011303@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8aef1cd698f1 - main - wsp: Use already-calculated distance of fingers for comparison. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8aef1cd698f177986ee4f51ff6f63ea7b0b35098 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8aef1cd698f177986ee4f51ff6f63ea7b0b35098 commit 8aef1cd698f177986ee4f51ff6f63ea7b0b35098 Author: Joshua Rogers AuthorDate: 2024-06-10 19:03:24 +0000 Commit: Warner Losh CommitDate: 2024-09-06 18:34:31 +0000 wsp: Use already-calculated distance of fingers for comparison. Also correctly use tun.max_double_tap_distance for maximum distance of fingers for vertical scrolling. Signed-off-by: Joshua Rogers Reviewed by: imp, wulf Pull Request: https://github.com/freebsd/freebsd-src/pull/1365 --- sys/dev/usb/input/wsp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c index 708a26498361..a8d6c14c7421 100644 --- a/sys/dev/usb/input/wsp.c +++ b/sys/dev/usb/input/wsp.c @@ -1263,9 +1263,7 @@ wsp_intr_callback(struct usb_xfer *xfer, usb_error_t error) dx = dy = 0; if (sc->dz_count == 0) dz = (sc->dz_sum / tun.z_factor) * (tun.z_invert ? -1 : 1); - if (sc->scr_mode == WSP_SCR_HOR || - abs(sc->pos_x[0] - sc->pos_x[1]) > tun.max_finger_area || - abs(sc->pos_y[0] - sc->pos_y[1]) > tun.max_finger_area) + if (sc->scr_mode == WSP_SCR_HOR || sc->distance > tun.max_double_tap_distance) dz = 0; } if (ntouch == 3)