From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51891: 29.0.50; [PATCH] Pixel delta support for wheel events on X Date: Thu, 18 Nov 2021 08:15:27 +0800 Message-ID: <87r1beqpy8.fsf@yahoo.com> References: <87zgq4uvh0.fsf.ref@yahoo.com> <87zgq4uvh0.fsf@yahoo.com> <871r3gnrrn.fsf@gmail.com> <875ysrtyak.fsf@yahoo.com> <871r3ftsjy.fsf@yahoo.com> <83r1bezz2u.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15340"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: rpluim@gmail.com, 51891@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 18 01:16:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mnV66-0003ky-OA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Nov 2021 01:16:14 +0100 Original-Received: from localhost ([::1]:50442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnV65-0002yO-1V for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Nov 2021 19:16:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnV5u-0002y8-En for bug-gnu-emacs@gnu.org; Wed, 17 Nov 2021 19:16:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50816) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mnV5u-0007en-65 for bug-gnu-emacs@gnu.org; Wed, 17 Nov 2021 19:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mnV5t-0006pM-Rb for bug-gnu-emacs@gnu.org; Wed, 17 Nov 2021 19:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Nov 2021 00:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51891 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51891-submit@debbugs.gnu.org id=B51891.163719454126205 (code B ref 51891); Thu, 18 Nov 2021 00:16:01 +0000 Original-Received: (at 51891) by debbugs.gnu.org; 18 Nov 2021 00:15:41 +0000 Original-Received: from localhost ([127.0.0.1]:34129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnV5Z-0006oZ-7R for submit@debbugs.gnu.org; Wed, 17 Nov 2021 19:15:41 -0500 Original-Received: from sonic313-9.consmr.mail.ne1.yahoo.com ([66.163.185.32]:42997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnV5X-0006oI-6t for 51891@debbugs.gnu.org; Wed, 17 Nov 2021 19:15:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1637194533; bh=BKOiRs0ytVnxxbza2AcAYLPinaAHlTDBnUduuupgZaA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Rb4rcBnJ0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j0nKq3Qn8lHK1lieiSMOPoaJreWb.6z2JEgfla8ByvhpcCCNpVLOjVlHl3nv9ja5b Vh.1UMrCi9XddiINmMGM2La5oQHJS8UCX2QMqj1NeTezIH26PdcXP.r4wOTyo8sCqJ.Vta.0DTeF oIBS.mMnm8.ovqVs.8sll9rza1GYLQbnpgxvriVkuhkHkzt5ytB100wbZ3EJvAtRmYOKbseY9Itq 4bFStRuIStb5H1H2zRPWGsxi1.xhp28dw.kyL1RrDJ0uGJYDZOvrBZSGQA6DYLvZZj1ryC_LJjUh tVeleDW3Bi18_BR7YGtscWohLOWYwTAErVj5zwG.JIBXJkYEyc0H6rr_I55LS2WF.F_PNOnQImOI GdNGfJF23ACESaUhWNACBFaVvQkCXSfAsGLcBk5qvsG2APEQuvQ8wO7WeOyEp2ZhsbV9JJ_z5K0q 7FPpxwQWHswIiU7HRJ6kpy_B0GhIiq3CDgAXZA3IxwGGkbPXIgKHi8LYzyf0oyRGyxXY8NlwR.a_ i337C3VViWS8YDEFw.588vqikEL1f75McoXY2XlYTGbmR4S6SUdrn8eiY8DYSLXdPoPJWpRNUy82 diN7IFb5Ocn0F9kfmndE2FoylGRS.71d.Owa.d2hcj X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Thu, 18 Nov 2021 00:15:33 +0000 Original-Received: by kubenode518.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID f9a374bfc0513cc485f6edcefe69d5f7; Thu, 18 Nov 2021 00:15:30 +0000 (UTC) In-Reply-To: <83r1bezz2u.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 Nov 2021 15:33:29 +0200") X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220262 Archived-At: Eli Zaretskii writes: > Did you consider the possibility of defining a new event? Yes I did, but IMO it makes more sense to make this use the normal `wheel-events'. > And should mwheel.el be aware of this change somehow? It doesn't have to. A separate mwheel-scroll-*-function can be used to implement pixel scrolling, once we get to that. > And finally, why introduce keyword-value pairs into a form that didn't > use them before? Can we store just the values there? Different window systems might have more/different information. For instace, I can imagine the GTK port wanting to include scroll phase and inertia data into this propertly list. >> + scroll_unit = pow (FRAME_PIXEL_HEIGHT (f), 2.0 / 3.0); > Ouch! can we avoid calling 'pow' here? It's an expensive function. That's what the other big users of XInput 2 do, including GTK+ and Mozilla Firefox, and is unfortunately the only method of obtaining true pixel scroll data from a scroll valuator. >> + DEFVAR_BOOL ("x-coalesce-scroll-events", x_coalesce_scroll_events, >> + doc: /* Non-nil means to only send one wheel event for each scroll unit. >> +Otherwise, a wheel event will be sent every time the mouse wheel is >> +moved. > This is confusing: what does "scroll unit" mean in this context? An amount of scrolling that would previously generate a `mouse-4' or `mouse-5' event. But since I think most people don't know what such button events are, it would not be sufficient to just put that into the doc string. Any ideas? Thanks!