From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master e37eb7f: Add support for pixel wheel deltas on NS Date: Sat, 27 Nov 2021 12:47:40 +0200 Message-ID: <83y259zxgz.fsf@gnu.org> References: <20211125030922.2353.1129@vcs0.savannah.gnu.org> <20211125030924.7258E2094B@vcs0.savannah.gnu.org> <871r34h6pi.fsf@gmail.com> <87fsrkzfq1.fsf@yahoo.com> <83tug05whz.fsf@gnu.org> <87tufzycli.fsf@yahoo.com> <837dcv4e79.fsf@gnu.org> <87wnkvflk7.fsf@yahoo.com> <83zgpr2uvr.fsf@gnu.org> <87fsrjfeb1.fsf@yahoo.com> <83r1b32lvr.fsf@gnu.org> <877dcvf8ec.fsf@yahoo.com> <831r323lgs.fsf@gnu.org> <87v90ecvoa.fsf@yahoo.com> <83lf1a1651.fsf@gnu.org> <875ysecd75.fsf@yahoo.com> <83fsri13k0.fsf@gnu.org> <87wnkuax4q.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14761"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 27 11:48:39 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mqvG3-0003bx-1Z for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Nov 2021 11:48:39 +0100 Original-Received: from localhost ([::1]:34122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqvG0-0000rr-RQ for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Nov 2021 05:48:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqvF1-0007vd-Rk for emacs-devel@gnu.org; Sat, 27 Nov 2021 05:47:36 -0500 Original-Received: from [2001:470:142:3::e] (port=54342 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqvF1-0000UC-9q; Sat, 27 Nov 2021 05:47:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5J824h/r5M/1V2gCCSTg8r7JVM69XqvWAm+3SpNuTMc=; b=qztK58PZyxfI UT/+B7o6hGzfXR2V8f/Fv6oWLD7KVgUFCt++ULiIs7pwsAdZXo3i4dBVg/jdX8hIYWJkJBci6OcME k28ZdNaHfrMQlZHCxsj8mPJYuCOYMbEIuWOAD1qbsBPigfWxnq5bsSSnmwCpWDDylcL6eAhxzHRpY FynGan74OGYndFhg8x+09KY8So/rnhEZGan5I1mdZilpY9NdDCrDGqxkPMxG4w87jpK1Ky2HlB17p 7Z94LpbZMHWn9FioD8stmMAwfSII9blpaamis82QjX6hbF9gTYmHE6uWp/SE78chWaKWbkygebXWy y4MKDYHfNLn/PfIU17aycQ==; Original-Received: from [87.69.77.57] (port=4705 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqvF0-0000oh-Th; Sat, 27 Nov 2021 05:47:35 -0500 In-Reply-To: <87wnkuax4q.fsf@yahoo.com> (message from Po Lu on Sat, 27 Nov 2021 15:14:13 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280319 Archived-At: > From: Po Lu > Cc: rpluim@gmail.com, emacs-devel@gnu.org > Date: Sat, 27 Nov 2021 15:14:13 +0800 > > >> On a reasonably sized frame that would be 1 to 2 pixels. > > > Is this with a mouse wheel or with a touchpad? I was asking about the > > mouse wheel. > > This is with a mouse wheel that supports pixel values, i.e., a mouse > wheel that has no fixed "steps". (A mouse wheel with fixed steps would > however report a value of 1.0: every XInput 2 program I tried will > scroll the close-to-100 pixels that implies on each turn of such a > wheel.) OK, thanks. Btw, I'm confused by the documentation of the enhanced mouse-wheel events. The manual says @item (wheel-up @var{position}) @itemx (wheel-down @var{position}) [...] The event may have additional arguments after @var{position}. The third argument after @var{position}, if present, is a pair of the form @w{@code{(@var{x} . @var{y})}}, where @var{x} and @var{y} are the number of pixels to scroll by in each axis. It mentions the 3rd argument (starting from 1, I presume, given the format of the event shown in @item). But the code in pixel-scroll.el does: (let ((delta (round (cdr (nth 4 event))))) So it takes the 4th element (zero-based), which is a 2-element discrepancy. What is the real form of the enhanced wheel events, and what are the 5 elements in them? Or what am I missing here?