microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.25k stars 307 forks source link

Mouse look in Minecraft in Ubuntu 20.04 in WSL2 is broken #374

Open CoconutMacaroon opened 3 years ago

CoconutMacaroon commented 3 years ago

Environment

Windows build number: Microsoft Windows [Version 10.0.22000.71]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.24

Steps to reproduce

Install the latest version of Minecraft Java edition into WSL2. I did this by installing Firefox (in WSL2), downloading the .deb file, installing the prerequisties, and then installing the .deb file. I then ran minecraft-launcher, which opened the launcher (in WSL) and launched the latest version of the game (unmodded 1.17.1). I joined a realm (although a server/world should have the same issue), and tried to look arround. I could rotate my character by moving the mouse left-right but I couldn't make my character look up, by moving the mouse up. WASD to move worked, however.

WSL logs:

You can access the wslg logs using explorer at: \\wsl$\<Distro-Name>\mnt\wslg (e.g.: \\wsl$\Ubuntu-20.04\mnt\wslg)

When I move the mouse to look, I should be able to look up/down instead of just left/right. Also, the game should hide/capture the mouse cursor. Instead, I can see the cursor, which shouldn't happen.

Actual behavior

I can use the mouse to rotate/spin my character, but I can't look up/down. Also, the mouse cursor is visable.

zongmi commented 3 years ago

Want to continue using Microsoft input method in WSLG

Aerocatia commented 2 years ago

WSLg does not seem to support grabbing the mouse in general, the same thing happens with chocolate-doom. (https://github.com/chocolate-doom/chocolate-doom)

SirCupOfReese commented 1 year ago

WSLg does not seem to support grabbing the mouse in general, the same thing happens with chocolate-doom. (https://github.com/chocolate-doom/chocolate-doom)

Sorry to resurrect this thread, but was there ever a resolution on this? I'm actually working with chocolate-doom as of a few days ago, and decided to build it through WSL2, but every time I go to test my mouse goes nuts. Sensitivity is off the charts and no matter which direction I move the mouse, I always look right. The same code built as a Windows binary runs fine.

kiedtl commented 1 year ago

The exact same thing happens with Minetest.

Reavershark commented 1 year ago

The exact same thing is happening with a custom glfw application. (ubuntu 22.04)