Closed Bug 1930525 Opened 1 year ago Closed 2 months ago

Pointer Lock API has incorrect cursor speed

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 132
defect

Tracking

()

RESOLVED DUPLICATE of bug 2036028

People

(Reporter: joshas, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0

Steps to reproduce:

Open this example https://mdn.github.io/dom-examples/pointer-lock/ and click inside black rectangle to capture cursor.

Actual results:

When moving mouse, circle moves way slower than it should be moving.

Expected results:

Circle should be moving at the same speed as mouse cursor when it is not captured. Opening same example in GNOME Web (Epiphany) browser, results in correct experience, where circle is moving at the same speed as the mouse cursor. Similar issues occur in 3D Unity games on the web, but usually after cursor is captured whole view spins too fast and it is impossible to control camera, while when cursor is not captured camera moves more or less correctly. Fedora 41, GNOME, Wayland.

The Bugbug bot thinks this bug should belong to the 'Core::WebRTC: Audio/Video' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → WebRTC: Audio/Video
Product: Firefox → Core
Component: WebRTC: Audio/Video → DOM: UI Events & Focus Handling

I'm on Fedora 40, with Wayland. I'll update and try to reproduce tomorrow.

Flags: needinfo?(afarre)
See Also: → 1930685

Also, thank you for the report!

I tried this on both nightly and release, running Fedora 41 with Wayland, but I couldn't reproduce.

I know you said that you run Fedora on Wayland, but just to be sure, could you check the output of:

$ echo $XDG_SESSION_TYPE

Also, are you aware of having this problem before? If not, and this is something new, could I ask you to try finding a regression range using mozregression? It would help a lot.

Flags: needinfo?(afarre) → needinfo?(joshas)

$XDG_SESSION_TYPE is "wayland".
I was having this issue for quite a while now, so I don't think that I'll be able to find last working version and work my way through where it broke.

Just out of curiosity I connected another mouse I had lying around. Unbelievable, but that mouse does not have slowness issue when pointer is locked.
Logitech G305 - has pointer lock issues. Even changing DPI by using button on mouse does not fix the issue, locked pointer does not match the speed of mouse movement when it is not locked.
Logitech M90 - no issues with example, but still problems with camera movement in 3D web games built using Unity engine.

Flags: needinfo?(joshas)

Have you seen this behavior Edgar?

Flags: needinfo?(echen)

We have similar issues on some specific mouse, e.g. bug 1869968. But I could not reproduce on my Wayland Ubuntu.

Flags: needinfo?(echen)
See Also: → 1869968

Bug 2036028 makes the movement data more reliable in pointer lock, it seems it also fixes this.

Depends on: 2036028

I believe bug 2036028 also fixes this. Feel free to reopen or file a new bug if you still encounter same issue.

Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Duplicate of bug: 2036028
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.