MidnightControls

MidnightControls

447k Downloads

Bug: Controller can't move cursor on Wayland

ryleu opened this issue ยท 6 comments

commented

Describe the bug
On a Linux device with wayland instead of xorg, the position of the pointer in menus is invisible because wayland programs aren't able to control the mouse.

To Reproduce
Steps to reproduce the behavior:

  1. Install your launcher in flatpak on a wayland device. I used Fedora Workstation and Prism Launcher
  2. Install midnight controls and set up controller mode
  3. Open up a world and then press the up face button to open your inventory
  4. Notice that the cursor does not move with your joystick inputs

Expected behavior
A cursor should move, even if it isn't the native cursor. A good solution would be to add a stylized cursor like what console versions of minecraft have.

Screenshots
Note how the crafting table selected with the controller is not in the same place as the native cursor:
image

You can also see that the slot under the crafting table is highlighted, even though the cursor is elsewhere:
image

Desktop (please complete the following information):

  • OS: Fedora Workstation 36
  • Minecraft 1.19.2
  • Fabric 1.14.9
  • Mods originally discovered with a massive mod pack, but successfully reproduced with no other mods except dependencies
  • Version 1.7.0+1.19
  • Branch release

Additional context
The original modpack is this one: https://github.com/ryleu/mcw-mods/releases/tag/doubt

commented

I've encountered this issue myself on my laptop which is also running Fedora Workstation 36, but thought it was just some GNOME weirdness, so thanks for the Wayland explanation.
I fixed it back then by activating the "Virtual Mouse Cursor" option in the MidnightControls options screen that appears in the Controller Options screen. I'll try adding the ability to hide the default cursor when the virtual mouse cursor is enabled, and automatically activate both options when Wayland is detected.

commented

That would be excellent. Thanks for letting me know about the virtual mouse cursor option.

commented

I am still encountering this issue on v1.8.1 on Minecraft 1.19.4 using Fabric running on Gnome 43 (Arch Linux). In my case, however, not only is the standard mouse cursor always present on my screen (yet disconnected from the controller cursor location) but enabling the virtual mouse cursor does not display the appropriate graphic.

Full system and game details:
EndeavorOS (Arch)
Gnome 43.3
Minecraft 1.19.4
Fabric Loader 0.14.17
Fabric API 0.76.0+1.19.4
MidnightControls 1.8.1+1.19.4
Tested with no other mods (excluding dependencies)

commented

confirmed on whatever KDE ships with Fedora KDE 38, and also with GNOME 44

commented

@Motschen to check for wayland, you can simply see if the WAYLAND_DISPLAY environment variable is set. i know this because i sometimes force programs to launch using xwayland by running WAYLAND_DISPLAY= programName to unset the variable

commented

I can confirm this issue on Wayland on Fedora 38 KDE Spin as well. Virtual pointer invisible as well for whatever reason.