unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: 57526@debbugs.gnu.org
Subject: bug#57526: 29.0.50; Precise pixel-scrolling works great with touchpad but not with mouse wheel
Date: Fri, 02 Sep 2022 06:57:15 +0200	[thread overview]
Message-ID: <875yi64ag4.fsf@gnu.org> (raw)
In-Reply-To: <87wnamlgq3.fsf@yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 2404 bytes --]

Po Lu <luangruo@yahoo.com> writes:

>> The reason for the difference is that the EVENTs passed to
>> pixel-scroll-precision have very different delta values.  The
>> touchpad events command emacs to scroll about 20 pixels, the mouse
>> wheel events command it to scroll 150 pixels.
>
> Try playing with pixel-scroll-precision-large-scroll-height; start
> with a value of 30, and adjust it upwards if it interferes with
> trackpad scrolling.

Oh, yes, that does the trick.  I don't actually feel much of a
difference (if any) no matter if I set it to 10 vs. 140.  It seems it
must be at least smaller as the delta in the mouse wheel events (150) in
order to have any effect but that's it.  So I went with 140.

>> I see there's some interpolation feature which might be relevant but
>> I don't get into that code path because (device-class
>> last-event-frame last-event-device) returns core-keyboard instead of
>> mouse.  I get that value in both the case where I scrolled using
>> touchpad as well as mouse.  When I typed something with the real
>> keyboard, it says just keyboard.
>
> That part of the code will be reworked soon in accordance with an
> earlier discussion, and you can assist with that by sending the result
> of running "xinput list --long", which will help determine why your
> mouse is not being recognized by Emacs.

The short list is:

--8<---------------cut here---------------start------------->8---
❯ xinput list
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ xwayland-pointer:39                     	id=6	[slave  pointer  (2)]
⎜   ↳ xwayland-relative-pointer:39            	id=7	[slave  pointer  (2)]
⎜   ↳ xwayland-pointer-gestures:39            	id=8	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ xwayland-keyboard:39                    	id=9	[slave  keyboard (3)]
--8<---------------cut here---------------end--------------->8---

Interestingly, that list is the same no matter if I plugged my mouse
into my notebook's USB slot or if it is not connected.

The long list is attached.

[-- Attachment #2: xinput-list-long.txt --]
[-- Type: text/plain, Size: 5345 bytes --]

WARNING: running xinput against an Xwayland server. See the xinput man page for details.
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
	Reporting 3 classes:
		Class originated from: 2. Type: XIButtonClass
		Buttons supported: 10
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None
		Button state:
		Class originated from: 2. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 2. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative

⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
	Reporting 3 classes:
		Class originated from: 4. Type: XIButtonClass
		Buttons supported: 10
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None
		Button state:
		Class originated from: 4. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 4. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative

⎜   ↳ xwayland-pointer:39                     	id=6	[slave  pointer  (2)]
	Reporting 7 classes:
		Class originated from: 6. Type: XIButtonClass
		Buttons supported: 10
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None
		Button state:
		Class originated from: 6. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Abs X
		  Range: 0.000000 - 65535.000000
		  Resolution: 10000 units/m
		  Mode: absolute
		  Current value: 0.000000
		Class originated from: 6. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Abs Y
		  Range: 0.000000 - 65535.000000
		  Resolution: 10000 units/m
		  Mode: absolute
		  Current value: 0.000000
		Class originated from: 6. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Rel Horiz Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 6. Type: XIValuatorClass
		Detail for Valuator 3:
		  Label: Rel Vert Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 6. Type: XIScrollClass
		Scroll info for Valuator 2
		  type: 2 (horizontal)
		  increment: 1.000000
		  flags: 0x0
		Class originated from: 6. Type: XIScrollClass
		Scroll info for Valuator 3
		  type: 1 (vertical)
		  increment: 1.000000
		  flags: 0x2 ( preferred )

⎜   ↳ xwayland-relative-pointer:39            	id=7	[slave  pointer  (2)]
	Reporting 7 classes:
		Class originated from: 7. Type: XIButtonClass
		Buttons supported: 10
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None
		Button state:
		Class originated from: 7. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 7. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 7. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Rel Horiz Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 7. Type: XIValuatorClass
		Detail for Valuator 3:
		  Label: Rel Vert Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 7. Type: XIScrollClass
		Scroll info for Valuator 2
		  type: 2 (horizontal)
		  increment: 1.000000
		  flags: 0x0
		Class originated from: 7. Type: XIScrollClass
		Scroll info for Valuator 3
		  type: 1 (vertical)
		  increment: 1.000000
		  flags: 0x2 ( preferred )

⎜   ↳ xwayland-pointer-gestures:39            	id=8	[slave  pointer  (2)]
	Reporting 2 classes:
		Class originated from: 8. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 8. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative

⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
	Reporting 1 classes:
		Class originated from: 9. Type: XIKeyClass
		Keycodes supported: 248

    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
	Reporting 1 classes:
		Class originated from: 5. Type: XIKeyClass
		Keycodes supported: 248

    ↳ xwayland-keyboard:39                    	id=9	[slave  keyboard (3)]
	Reporting 1 classes:
		Class originated from: 9. Type: XIKeyClass
		Keycodes supported: 248


[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


Bye,
Tassilo

  reply	other threads:[~2022-09-02  4:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01 13:48 bug#57526: 29.0.50; Precise pixel-scrolling works great with touchpad but not with mouse wheel Tassilo Horn
2022-09-02  1:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-02  4:57   ` Tassilo Horn [this message]
2022-09-02  9:30     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-02 11:41       ` Tassilo Horn
2022-09-02 12:33         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-02 12:39           ` Tassilo Horn
2022-09-03  1:04             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-03  7:04               ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yi64ag4.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=57526@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).