Bug 478462 - webkit Element.requestPointerLock() lets pointer move
Summary: webkit Element.requestPointerLock() lets pointer move
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.27.5
Platform: Debian stable Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-13 01:27 UTC by steve
Modified: 2023-12-23 22:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description steve 2023-12-13 01:27:36 UTC
SUMMARY
During Element.requestPointerLock() the pointer is hidden but on release it reappears away from where it began.
Also it can hit the edge of your (desktop?) screen.

STEPS TO REPRODUCE
1. in chrome or brave but not firefox, go to https://svelte-dj-knob.netlify.app/
2. click+drag up

OBSERVED RESULT
pointer reappears above the knob.

EXPECTED RESULT
pointer reappears where it began the lock.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-13-amd64 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
It works fine on firefox, X11, or if your pointerdown event is within about 20px of the edge of the page.
Blaming kwin is based on not reproducing on two people's other compositors via oftc #wayland.
Perhaps someone can try it! Cheers.
Comment 1 steve 2023-12-13 04:31:34 UTC
It affects chromium 119 and 120.0.6099.71,
In 120 it works if your pointerdown event is within about 100px of the edge of the page (up from 20px)
to try that,
  resize that page so the space above the ring is the same as the thickness of the ring,
  drags from the top of the ring will work, but not the bottom.
Comment 2 steve 2023-12-13 06:56:36 UTC
it is for all pointerlock demos I can find or build, like this one:
https://www.smartjava.org/examples/pointerlock/
here's a video:
https://youtu.be/iK4VljDoVfg
the first drag locked, the second doesn't.
Comment 3 David Edmundson 2023-12-23 22:24:32 UTC
Works here in Plasma 6. If you can test that when 6 is out that would be great