View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006203||DarkRadiant||General||public||23.12.2022 00:53||20.02.2023 15:21|
|Summary||0006203: Incorrect mouse movement in 3D / 2D views on Plasma Wayland|
|Description||I use Manjaro Linux with KDE / Plasma: Due to numerous bugs I stuck to the X11 session and avoided Wayland, with most finally solved over the past years I decided to try switching to Wayland Plasma session again. TDM seems to be working great, DR starts up well but has a massive issue.|
On Wayland mouse capture and acceleration no longer seem to be working correctly. If I right-click the 3D viewport to go into mouselook or right-click-drag the 2D view, it will go in the direction of the mouse, but greatly accelerate throwing the view to one side immediately. It's as if the greater the cursor is from the center point of the window the faster it will interpret that movement. Currently this makes DR unusable as there's no way I can control and stabilize the view.
|Steps To Reproduce||Use any Linux distribution with KDE then start a Wayland Plasma session, be aware some distros may require installing a custom system package to present the option... I don't see why this shouldn't be reproducible on a virtual machine, so if you're a Windows user or don't want to change your Linux DE trying it in Virtualbox might work (haven't tested). Once that's done just start up DR and use mouselook in 3D view or dragging in the 2D view: You should see the view going all over the place even from small movements.|
|Tags||input, linux, mouse, views, wayland|
|Found a workaround thanks to jonri on the forum: Running DR with "export GDK_BACKEND=x11" will make it use X11 under a Wayland session. This confirms it's definitely a Wayland issue likely in interpreting its input system, Radiant won't have this problem if ran through Xwayland.|
After doing more testing and practically using DR under Wayland, I uncovered more bizarre functionality to this issue. Even when using the parameter GDK_BACKEND=x11 to run Radiant through X11, the same input issue will still occur in some cases.
First of all the model chooser will always have it: If you choose to add a new model or edit the model of a selected entity, right-clicking in the 3D view of the Choose Model window to look at the mesh from different angles causes the mouse to wildly throw the camera around only allowing for small movements.
Then I noticed the 2D view in the main window will sometimes start doing it too, though unlike the model browser it doesn't always have the problem and something triggers it (on X11 backend, full Wayland always does). Finally I was able to see what it is: After pressing X to select the clipper tool and cutting a brush, click-dragging the 2D view always produces the same exaggerated movement. Switching away from he clipper doesn't fix it once the issue has been triggered, right now I need to constantly restart DarkRadiant after using the clipper to cut a brush or I can't control the 2D view any more.
Some good news: I seem to have discovered what's triggering this... not in the code which I'm not familiar with, but in practice which seems obvious now. The bug seems to be caused by the mouse cursor not being locked during movement, the pointer moves together with the camera which doesn't happen under normal circumstances. This surely causes DR to interpret it at the new position each time and accelerate the further you go from the original position of the pointer when the view was first clicked. The exact behaviors (normal and broken) I'm seeing in both the 2D and 3D views as follows:
Normal: Right-clicking causes the mouse cursor to disappear as you move the view around. Once you let go of the mouse button or click it again to disengage, the cursor reappears at the same position on the screen as before you clicked.
Broken: Right-clicking no longer causes the mouse cursor to disappear while the view is controlled (a separate but minor annoyance). As you move the view around, the mouse cursor also moves on the screen instead of being locked.
|23.12.2022 00:53||MirceaKitsune||New Issue|
|23.12.2022 00:53||MirceaKitsune||Tag Attached: input|
|23.12.2022 00:53||MirceaKitsune||Tag Attached: linux|
|23.12.2022 00:53||MirceaKitsune||Tag Attached: mouse|
|23.12.2022 00:53||MirceaKitsune||Tag Attached: views|
|23.12.2022 00:53||MirceaKitsune||Tag Attached: wayland|
|23.12.2022 01:40||MirceaKitsune||Note Added: 0015609|
|07.01.2023 21:37||MirceaKitsune||Note Added: 0015727|
|20.02.2023 15:21||MirceaKitsune||Note Added: 0015956|