Bug 488500 - Cursor doesn't snap to center if it's moved a bit before opening the inventory in minecraft
Summary: Cursor doesn't snap to center if it's moved a bit before opening the inventor...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: input (other bugs)
Version First Reported In: git-stable-Plasma/6.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-14 14:13 UTC by kostadinshishmanov
Modified: 2025-07-02 03:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kostadinshishmanov 2024-06-14 14:13:22 UTC
SUMMARY
Sometimes when opening the inventory in Minecraft the cursor will snap to a random place on the screen if the mouse has been moved a bit before opening the inventory.

STEPS TO REPRODUCE
1. start a minecraft world
2. move the mouse 
3. open the inventory right after moving the mouse

OBSERVED RESULT

Sometimes the cursor snaps in a place different than the center

EXPECTED RESULT

The cursor always snaps to the center of the screen.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux
KDE Plasma Version: 6.0.90
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Graphics Platform: Wayland
Kwin is at commit 4b3f6a4312c02243c33d01e38ce2827664cae8ac
Dual Monitor
Mouse is Logitech G Pro X Superlight
Comment 1 kostadinshishmanov 2024-06-17 16:12:21 UTC
When using a grindstone in the game it gets even worse, and breaks the cursor even more, and after that consistenly isn't centered when using for example an enchantment table.
Comment 2 kostadinshishmanov 2024-11-21 23:24:16 UTC
This is still reproducible and it happens in Counter-Strike 2's buy menu too.
Comment 3 kde.outline995 2025-02-01 01:03:22 UTC
Hi, someone in the KDE Discussion website and I both have the same problem and is quite annoying. https://discuss.kde.org/t/mouse-can-move-in-games-when-it-shouldnt-be-able-to-and-it-isnt-visible/19565.

Are there any updates regarding this problem? It is still reproducible in minecraft on my system (fedora 41 KDE 6.2.5 wayland)

The other person with this issue has a nice video displaying the issue. https://youtu.be/xQWZdzZULCM.

Thanks for everyone's time ๐Ÿ™‚
Comment 4 Zamundaaa 2025-06-02 16:53:41 UTC
Both of these games run through Xwayland, which means this is most likely Xwayland's cursor locking heuristics not working perfectly.
Can you reproduce the issue in another compositor as well?
Comment 5 kostadinshishmanov 2025-06-02 16:59:35 UTC
I actually don't think I can reproduce it anymore, maybe it was fixed at some point?
Comment 6 kostadinshishmanov 2025-06-02 17:01:57 UTC
(In reply to kostadinshishmanov from comment #5)
> I actually don't think I can reproduce it anymore, maybe it was fixed at
> some point?

Should've said that I am using 6.3.91
Comment 7 Zamundaaa 2025-06-02 18:20:49 UTC
Not sure what change could've been relevant for this, but if it's fixed, I guess it doesn't really matter :)

(In reply to kde.outline995 from comment #3)
> It is still reproducible in minecraft on my system (fedora 41 KDE 6.2.5 wayland)
Can you test it on 6.3 and/or the 6.4 beta as well? FWIW I can't reproduce the issue with Minecraft in either 6.3 or 6.4.
Comment 8 Bug Janitor Service 2025-06-17 03:47:40 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2025-07-02 03:47:35 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.