Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll speed too low #5660

Closed
narfg opened this issue Apr 13, 2015 · 8 comments
Closed

Scroll speed too low #5660

narfg opened this issue Apr 13, 2015 · 8 comments

Comments

@narfg
Copy link

@narfg narfg commented Apr 13, 2015

Commit 9f3b308 made scrolling with the mouse wheel annoyingly slow. To be specific, this is not a performance problem but the scroll step size is too low.
I use Linux so this issue may be dependent on the OS.

@jdm
Copy link
Member

@jdm jdm commented Apr 13, 2015

@jdm
Copy link
Member

@jdm jdm commented Apr 13, 2015

Perhaps this is something that should be normalized in glutin, so we don't need to postprocess the received scroll events?

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Apr 13, 2015

Agreed with @jdm. As of now we do no munging of the scroll distance in Servo--we treat the events as describing pixels--so any fixes should be on glutin's side.

@frewsxcv
Copy link
Member

@frewsxcv frewsxcv commented Apr 14, 2015

Related to scrolling speed #5320

@robertknight
Copy link

@robertknight robertknight commented May 25, 2015

Brief notes on Qt/Gtk+/Chromium behaviors:

  • Glutin currently sends a scroll wheel event with delta values of +/-1 for each event on Linux, whereas the Windows/Mac implementations use the delta values from the Cocoa / WinAPI event.
  • The C GLFW implementation has the same behavior as Glutin on X11.
  • Qt uses a fixed value of +/- 120 as the delta for each event
  • Chromium uses a fixed value of +/- 53 as the delta (see https://code.google.com/p/chromium/codesearch#chromium/src/ui/events/x/events_x.cc&l=33) with a note that this was taken from Gtk+ , but uses device-provided values from XInput the device supports it.
  • Current Gtk+ appears to do the proper thing and read it from Xinput, so it looks like that should return the data reported by xinput list-props <mouse/touchpad device ID>
@nnethercote
Copy link
Contributor

@nnethercote nnethercote commented May 26, 2015

I just hit this. I would have guess it was 100x slower than before but looking at commit 9f3b308 I guess that's a 3.33x overestimate :)

@mrobinson
Copy link
Member

@mrobinson mrobinson commented May 26, 2015

I think the issue is that there are two kinds of mouse wheel movements. There are "ticks," which is what mice traditionally send. Ticks are essentially the height of a line. Different toolkits and browser interpret these in different ways. Apple mice and some XInput devices may also have a precise value which is an absolute number of pixels to move. The core of the problem seems to be glutin cannot detect the precise events and sends a naked number when the number may either refer to ticks or absolute pixels. Thus, Servo doesn't know how to interpret the number in the wheel event.

@mrobinson
Copy link
Member

@mrobinson mrobinson commented May 26, 2015

There is more information here: rust-windowing/glutin#451

robertknight pushed a commit to robertknight/servo that referenced this issue Jun 13, 2015
Platforms may report scroll deltas either in
chunks/lines/rows or pixels, depending on the
platform API and device capabilities.

If the platform reports a line/chunk-based delta
then the application needs to convert the delta
into a suitable number of pixels.

This commit just hardcodes it to 57 as
a starting point which matches the value that
Firefox calculates as the max char height
for the root frame on my system.

Fixes servo#5660
bors-servo pushed a commit that referenced this issue Jun 17, 2015
…alton

Use a faster scroll speed under X11

Platforms may report scroll deltas either in
chunks/lines/rows or pixels, depending on the
platform API and device capabilities.

If the platform reports a line/chunk-based delta
then the application needs to convert the delta
into a suitable number of pixels. Apple's documentation for example states
that the app should interpret the delta as a number of lines or rows to scroll,
depending on the type of view.

This commit just hardcodes it to 57 as
a starting point which matches the value that
Firefox calculates as the max char height
for the root frame on my system.

This depends on this Glutin PR: rust-windowing/glutin#483

Fixes #5660

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6373)
<!-- Reviewable:end -->
robertknight pushed a commit to robertknight/servo that referenced this issue Jun 20, 2015
Platforms may report scroll deltas either in
chunks/lines/rows or pixels, depending on the
platform API and device capabilities.

If the platform reports a line/chunk-based delta
then the application needs to convert the delta
into a suitable number of pixels.

This commit just hardcodes it to 57 as
a starting point which matches the value that
Firefox calculates as the max char height
for the root frame on my system.

Fixes servo#5660
robertknight pushed a commit to robertknight/servo that referenced this issue Jun 20, 2015
Platforms may report scroll deltas either in
chunks/lines/rows or pixels, depending on the
platform API and device capabilities.

If the platform reports a line/chunk-based delta
then the application needs to convert the delta
into a suitable number of pixels.

This commit just hardcodes it to 57 as
a starting point which matches the value that
Firefox calculates as the max char height
for the root frame on my system.

Fixes servo#5660
bors-servo pushed a commit that referenced this issue Jun 22, 2015
…alton

Use a faster scroll speed under X11

Platforms may report scroll deltas either in
chunks/lines/rows or pixels, depending on the
platform API and device capabilities.

If the platform reports a line/chunk-based delta
then the application needs to convert the delta
into a suitable number of pixels. Apple's documentation for example states
that the app should interpret the delta as a number of lines or rows to scroll,
depending on the type of view.

This commit just hardcodes it to 57 as
a starting point which matches the value that
Firefox calculates as the max char height
for the root frame on my system.

This depends on this Glutin PR: rust-windowing/glutin#483

Fixes #5660

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6373)
<!-- Reviewable:end -->
robertknight pushed a commit to robertknight/servo that referenced this issue Jun 22, 2015
Platforms may report scroll deltas either in
chunks/lines/rows or pixels, depending on the
platform API and device capabilities.

If the platform reports a line/chunk-based delta
then the application needs to convert the delta
into a suitable number of pixels.

This commit just hardcodes it to 57 as
a starting point which matches the value that
Firefox calculates as the max char height
for the root frame on my system.

Fixes servo#5660
bors-servo pushed a commit that referenced this issue Jun 22, 2015
…alton

Use a faster scroll speed under X11

Platforms may report scroll deltas either in
chunks/lines/rows or pixels, depending on the
platform API and device capabilities.

If the platform reports a line/chunk-based delta
then the application needs to convert the delta
into a suitable number of pixels. Apple's documentation for example states
that the app should interpret the delta as a number of lines or rows to scroll,
depending on the type of view.

This commit just hardcodes it to 57 as
a starting point which matches the value that
Firefox calculates as the max char height
for the root frame on my system.

This depends on this Glutin PR: rust-windowing/glutin#483

Fixes #5660

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6373)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.