Bug 480571

Summary: No mouse motion on Spice VM when mouse is grabbed
Product: [Plasma] kwin Reporter: B Negri <b.gomes.negri>
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal Keywords: qt6
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Libinput log
openttd with WAYLAND_DEBUG=1
List of installed packages
Program that demonstrates bug
Sample program stderr output with WAYLAND_DEBUG=1
Sample program output

Description B Negri 2024-01-30 22:52:42 UTC
Created attachment 165375 [details]
Libinput log

SUMMARY
When launching OpenTTD on fullscreen, on a QEMU VM with Spice video, the game refuses to accept mouse input motion. Alt-tabbing to another window is possible, but moving the mouse out of the game isn't.
If your mouse is on the "full screen" checkbox, you can get out of this state by clicking: the game still accepts mouse buttons.
This might be the game's fault.
Tried with a SDL2 full screen example, couldn't reproduce.

STEPS TO REPRODUCE
1. Launch OpenTTD
2. Go to "Game options"
3. Enable full screen

OBSERVED RESULT
Game won't respond to trying to move mouse. The game is still running, as clicking will disable full screen and return everything to normal and the background still moves

EXPECTED RESULT
Game correctly responds to pointer motion

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Rawhide
(available in About System)
KDE Plasma Version: 5.92.0 (Desktop says 6.0 RC1)
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
Output of rpm -qa, libinput debug-events and output of openttd with WAYLAND_DEBUG=1 attached
Comment 1 B Negri 2024-01-30 22:57:11 UTC
Created attachment 165376 [details]
openttd with WAYLAND_DEBUG=1
Comment 2 B Negri 2024-01-30 22:57:30 UTC
Created attachment 165377 [details]
List of installed packages
Comment 3 B Negri 2024-01-30 23:21:02 UTC
I modified https://github.com/aminosbh/basic-c-sdl-project to grab the mouse and log mouse input events. I'll attach the modified main.c
After grabbing the mouse, it registers only a single input event showing the current mouse position
I'll add its log with WAYLAND_DEBUG=1 as well as its output
Comment 4 B Negri 2024-01-30 23:21:45 UTC
Created attachment 165379 [details]
Program that demonstrates bug
Comment 5 B Negri 2024-01-30 23:23:21 UTC
Created attachment 165380 [details]
Sample program stderr output with WAYLAND_DEBUG=1
Comment 6 B Negri 2024-01-30 23:23:56 UTC
Created attachment 165381 [details]
Sample program output