minetest / minetest

Minetest is an open source voxel game-creation platform with easy modding and game creation
https://www.minetest.net/
Other
10.71k stars 2.02k forks source link

Mouse cursor isn't locked to the game window #14795

Closed jedomed closed 1 month ago

jedomed commented 3 months ago

Minetest version

Minetest 5.9.0-dev-4c001bd24 (Linux)
Using LuaJIT 2.1.0-beta3
Built by GCC 11.4
Running on Linux/5.15.0-112-generic x86_64
BUILD_TYPE=Release
RUN_IN_PLACE=1
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="."
STATIC_LOCALEDIR="locale"

Irrlicht device

SDL

Operating system and version

Linux Mint 21.1

CPU model

No response

GPU model

No response

Active renderer

No response

Summary

The mouse cursor isn't locked during the game. When I open the pause menu it snaps to the center, but while playing it keeps moving around, although it's invisible while still inside the game. If my mouse moves too far it leaves the game and starts interacting with other windows (e.g. if I have a browser open next to it and I scroll down to use the inventory bar, it also scrolls in the browser. Same with the task bar.) If I then move my mouse back in the game window, the camera suddenly snaps to a different direction.

Steps to reproduce

  1. Play Minetest in a non-fullscreen window or with multiple monitors
  2. Keep moving mouse to the side until it leaves the game window
  3. Move the mouse back inside the game window to see the camera snap
Zughy commented 2 months ago

MT 5.10-dev, OpenSUSE Tumbleweed, SDL, Mesa Intel HD Graphics 500, KDE Plasma 6.1.4, can't reproduce.

Can you provide more data? (CPU, GPU)

rubenwardy commented 2 months ago

Are you sure you're using SDL with 5.9.0? The default is X11