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 14:02:28 +0200 Message-ID: <83h7bxzu0b.fsf@gnu.org> References: <20211125030922.2353.1129@vcs0.savannah.gnu.org> <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> <83y259zxgz.fsf@gnu.org> <87sfvhc1hp.fsf@yahoo.com> <83tufxzwq9.fsf@gnu.org> <87k0gtc0z5.fsf@yahoo.com> <87fsrhc0lz.fsf@yahoo.com> <83pmqlzvel.fsf@gnu.org> <877dctbzno.fsf@yahoo.com> <83ilwdzv0i.fsf@gnu.org> <8735nhbz74.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1009"; 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 13:04:41 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 1mqwRc-000AdB-Ls for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Nov 2021 13:04:40 +0100 Original-Received: from localhost ([::1]:46394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqwRb-0008IJ-A5 for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Nov 2021 07:04:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqwPP-0007JR-0d for emacs-devel@gnu.org; Sat, 27 Nov 2021 07:02:23 -0500 Original-Received: from [2001:470:142:3::e] (port=56690 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 1mqwPO-0002Ac-8S; Sat, 27 Nov 2021 07:02:22 -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=VF30HJ5lYK+F2uck8gloJN29acrjQipj3sOkDNuMY+s=; b=GEPRt0vcFRj7 B9uxVG1tyCAyo4oV+3XGkupfCXkHlQ4gddGRD28WppwleF7xKIOm10b15HTf73yISAN9oVFg2hm+T Q8cld/sHYoGW1TwWfyEYZ/9c01t88klBp/tteHhUiJZ/pB2x7GA9Y6q2IdoqZE7W5be1d9YPu0ew4 OYck7ATaOj5kMTlk0UTBXSthB1xTGtHcvsPo3BRD/5bSmeVk57gFTBqeex3B8+OG8wz62g65GObPG OMU9zYLSyGk5MdqbJgfBbyv2XHA4bKAPR684IW2W8IeD4A0Xpm4kKoVX/jcLCzQxQWHjMMEmMJcij StRZ8IUXwkODsHSgHLAY1w==; Original-Received: from [87.69.77.57] (port=1528 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 1mqwPN-0000gE-D0; Sat, 27 Nov 2021 07:02:21 -0500 In-Reply-To: <8735nhbz74.fsf@yahoo.com> (message from Po Lu on Sat, 27 Nov 2021 19:44:15 +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:280332 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Sat, 27 Nov 2021 19:44:15 +0800 > > > if (CONSP (event->arg)) > > return list5 (head, position, make_fixnum (double_click_count), > > XCAR (event->arg), Fcons (XCAR (XCDR (event->arg)), > > XCAR (XCDR (XCDR (event->arg))))); > > > > ? If so, this always produces a 5-element list, and CLICKS is always > > included. Right? > > Yes, but event->arg might not always be a cons. On X, it is only a cons > in XInput 2 events that have precise scrolling information. When > handling legacy events, it is nil. I did mean what happens when the precise scrolling information is there. > AFAIU (and this may not be a very accurate understanding), if event->arg > is a cons, it means it might have line scroll information, and has pixel > scroll information. > > Otherwise, if it is a number, it has only line information. > > Otherwise, if the wheel event is double or triple, `double_click_count' > will be included. > > And otherwise, only the event name and position will be included. So I think the manual should describe these possibilities, i.e. that every member past POSITION can be present or absent, and if it's present, the next one could be present or absent, etc.