Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Controller can't move cursor on Wayland #123

Open
ryleu opened this issue Oct 21, 2022 · 6 comments
Open

Bug: Controller can't move cursor on Wayland #123

ryleu opened this issue Oct 21, 2022 · 6 comments
Labels
bug Something isn't working wayland The issue is related to the Wayland protocol

Comments

@ryleu
Copy link

ryleu commented Oct 21, 2022

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

@ryleu ryleu added the bug Something isn't working label Oct 21, 2022
@Motschen
Copy link
Member

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.

@Motschen Motschen added the wayland The issue is related to the Wayland protocol label Oct 27, 2022
@Motschen Motschen pinned this issue Oct 27, 2022
@ryleu
Copy link
Author

ryleu commented Dec 12, 2022

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

@timayowo
Copy link

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)

@ryleu
Copy link
Author

ryleu commented Apr 27, 2023

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

@ryleu
Copy link
Author

ryleu commented Apr 27, 2023

@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

@Mariocraft95
Copy link

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

@Motschen Motschen changed the title Controller can't move cursor on wayland Bug: Controller can't move cursor on wayland Feb 14, 2024
@Motschen Motschen changed the title Bug: Controller can't move cursor on wayland Bug: Controller can't move cursor on Wayland Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wayland The issue is related to the Wayland protocol
Projects
None yet
Development

No branches or pull requests

4 participants