Created attachment 150820 [details] The start of the 'Golf Jambalaya' course being displayed incorrectly. +++ This bug was initially created as a clone of Bug #444063 +++ SUMMARY At the start of a new shot in Neverputt, the strength/direction mouse cursor doesn't display properly when the game is run on Plasma Wayland. It positions the course at a weird angle and the default strength meter is always set to maximum. This happens in both full-screen and windowed (see attached screenshot). Game runs perfectly on Gnome Wayland and also all X11 versions, including KDE. This was seemingly fixed on Intel - see Bug #444063 - but is still present on amdgpu. It was tested on EndeavourOS and Manjaro. SOFTWARE/OS VERSIONS Operating System: EndeavourOS KDE Plasma Version: 5.25.3 KDE Frameworks Version: 5.96.0 Qt Version: 5.15.5 Kernel Version: 5.18.12-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 8 × AMD Ryzen 3 PRO 4350GE with Radeon Graphics Memory: 15.0 GiB of RAM Graphics Processor: AMD RENOIR Manufacturer: LENOVO Product Name: 11JKS07500 System Version: ThinkCentre M75q Gen 2
With the latest build of Neverputt 1.6.0 on Arch and OpenSUSE, the problem has got worse. Not only does it display the shot at a weird angle, but it's no longer even possible to correct this with the mouse. The mouse cursor will only move left or right a tiny amount.
Findings: - I could reproduce an issue with Neverputt, but Neverball seemed to behave - Both were run via xwayland - Starting another (rootful) xwayland to get logs also seemed to have it mostly behave Right now this might be a kwin issue, it might be an Xorg issue
Updates: sometimes reproducible with nested xwayland, sometimes not xwyaland is creating a confined pointer with no region, lifespan is persistent: On focus out, we send a slightly weird [ 275145.358] discarded zwp_confined_pointer_v1@37.unconfined() [ 275145.359] discarded zwp_confined_pointer_v1@37.confined() [ 275145.360] discarded zwp_confined_pointer_v1@37.unconfined() though this is after client destruction so not very relevant our relative motion events look sane, they don't match what we're seeing in the game.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4055
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4056
Git commit 7c91c4bad9ee709eebfdf9d5b3997fa00ca7cd13 by Vlad Zahorodnii. Committed on 05/05/2023 at 09:01. Pushed by vladz into branch 'master'. wayland: Avoid pointer warp if constraint region is invalid It may happen that the constraint region doesn't include the specified cursor hint anymore. If that's the case, avoid warping the pointer. M +2 -2 src/pointer_input.cpp https://invent.kde.org/plasma/kwin/commit/7c91c4bad9ee709eebfdf9d5b3997fa00ca7cd13
Git commit d7033a3c83134f383fbbd8e005ff6a10c79e48d4 by Vlad Zahorodnii. Committed on 05/05/2023 at 09:26. Pushed by vladz into branch 'Plasma/5.27'. wayland: Avoid pointer warp if constraint region is invalid It may happen that the constraint region doesn't include the specified cursor hint anymore. If that's the case, avoid warping the pointer. (cherry picked from commit 7c91c4bad9ee709eebfdf9d5b3997fa00ca7cd13) M +2 -2 src/pointer_input.cpp https://invent.kde.org/plasma/kwin/commit/d7033a3c83134f383fbbd8e005ff6a10c79e48d4
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4094
Git commit 07da1796b8388b00275d8281fac476bde71cd02b by Vlad Zahorodnii. Committed on 11/05/2023 at 19:56. Pushed by vladz into branch 'master'. Revert "wayland: Avoid pointer warp if constraint region is invalid" This reverts commit 7c91c4bad9ee709eebfdf9d5b3997fa00ca7cd13. It created regressions in some video games. After a closer look at the pointer constraint region handling, there are some issues, but it might be safer to fix them in master. In meanwhile, let's revert 7c91c4bad because it breaks more things than it fixes. Related: bug 469555 M +2 -2 src/pointer_input.cpp https://invent.kde.org/plasma/kwin/commit/07da1796b8388b00275d8281fac476bde71cd02b
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4096
Git commit 3d62e7548955e2ddf298c61a55fcd26007ea27bb by Vlad Zahorodnii. Committed on 12/05/2023 at 06:26. Pushed by vladz into branch 'Plasma/5.27'. Revert "wayland: Avoid pointer warp if constraint region is invalid" This reverts commit 7c91c4bad9ee709eebfdf9d5b3997fa00ca7cd13. It created regressions in some video games. After a closer look at the pointer constraint region handling, there are some issues, but it might be safer to fix them in master. In meanwhile, let's revert 7c91c4bad because it breaks more things than it fixes. Related: bug 469555 (cherry picked from commit 07da1796b8388b00275d8281fac476bde71cd02b) M +2 -2 src/pointer_input.cpp https://invent.kde.org/plasma/kwin/commit/3d62e7548955e2ddf298c61a55fcd26007ea27bb
Git commit 6c71b8720038e108ce4e494b0ef99e15e8e5b67d by Vlad Zahorodnii. Committed on 15/05/2023 at 07:36. Pushed by vladz into branch 'master'. wayland: Fix null pointer constraint region handling If the pointer constraint region is null, the input region must be used instead. If the pointer constraint region is valid, it should be intersected with the input region. M +15 -23 src/pointer_input.cpp M +24 -4 src/wayland/autotests/client/test_pointer_constraints.cpp M +35 -10 src/wayland/pointerconstraints_v1_interface.cpp M +2 -0 src/wayland/pointerconstraints_v1_interface_p.h M +10 -9 src/wayland/surface_interface.cpp M +0 -10 src/window.cpp M +0 -1 src/window.h https://invent.kde.org/plasma/kwin/commit/6c71b8720038e108ce4e494b0ef99e15e8e5b67d