Bug 475546

Summary: Unable to grab mouse cursor on Wayland
Product: [Plasma] kwin Reporter: CUI Hao <cuihao.leo>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kde.fossil822, nate, xaver.hugl
Priority: NOR Keywords: wayland-only
Version First Reported In: 5.27.8   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description CUI Hao 2023-10-13 04:14:57 UTC
SUMMARY

Mouse cursor cannot be grabbed on Wayland.

STEPS TO REPRODUCE
1. On a Plasma Wayland session, run qemu-system-x86_64
2. Click inside the QEMU window

Also tested: Xpra and VirtualBox.

OBSERVED RESULT

The mouse cursor is not grabbed by QEMU and can still move outside, although QEMU believes that it grabs the mouse (as the window title changes to "Press Ctrl+Alt+G to release grab").

EXPECTED RESULT

The mouse cursor is grabbed.

On Plasma X11, Mouse grabbing works as expected.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux, with 6.5.6-arch2-1 kernel.
(available in About System)
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Comment 1 Zamundaaa 2024-03-12 15:26:12 UTC
Are those VMs running as X11 apps? Xwayland has some heuristics for when cursor grabbing is allowed, and those will probably not work for VMs
Comment 2 Bug Janitor Service 2024-03-27 03:46:49 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2024-04-11 03:48:04 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!