Bug 388885 - Pointer does not unfreeze after closing an app that locks it
Summary: Pointer does not unfreeze after closing an app that locks it
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: git master
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 398421 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-12 23:20 UTC by Ivan S
Modified: 2018-09-15 00:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: Wayland+
mgraesslin: X11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan S 2018-01-12 23:20:27 UTC
When using an app like Xonotic/Nexuiz, which uses a locked cursor, closing the app results in the cursor still being frozen even after I hold Escape. Opening and closing the ksmserver logout greeter seems to unfreeze the pointer.
Comment 1 Martin Flöser 2018-01-13 07:01:48 UTC
Are these XWayland applications?
Comment 2 Ivan S 2018-01-13 14:16:55 UTC
(In reply to Martin Flöser from comment #1)
> Are these XWayland applications?

Yes, the apps I have tried this on are most likely using XWayland. Could be wrong though.
Comment 3 Martin Flöser 2018-01-13 14:56:55 UTC
> Yes, the apps I have tried this on are most likely using XWayland. Could be
> wrong though.

My theory is that the pointer is after ending on another XWayland window and XWayland doesn't remove the lock. That's something I experienced myself a few times without finding really a pattern. But your bug report helped me get this idea.
Comment 4 Yannick 2018-02-12 19:24:13 UTC
I can confirm this issue, on Archlinux with Plasma 5.12.0.
In my case however, the cursor is unfrozen after holding Escape for 3 seconds.

It only happens when I run Xonotic through XWayland.
When Xonotic uses the SDL Wayland backend (SDL_VIDEODRIVER=wayland), the cursor is unfrozen as expected when closing the app.

However, with the game Neverball, pressing Escape in-game pauses the game (but doesn't close it) and the cursor remains frozen, with both the X11 and Wayland SDL backends.
Comment 5 Alexander Mentyu 2018-05-18 18:17:40 UTC
Can reproduce cursor freeze in VirtualBox
VirtualBox launched with QT_QPA_PLATFORM=xcb option

virtualbox 5.2.12-1
Plasma: 5.12.5
Apps: 18.04.0
Frameworks: 5.46.0
Qt: 5.10.1
Kernel: 4.14.41-1-MANJARO
OS: Netrunner Rolling
Video: Intel 4400
Driver: xf86-video-intel 1:2.99.917+831+ge7bfc906-1
Screen: 1600x900
wayland-protocols 1.13-1
wayland 1.14.0-1
Comment 6 Roman Gilg 2018-06-10 16:00:05 UTC
Potential fix: https://phabricator.kde.org/D13466
Comment 7 Roman Gilg 2018-06-11 20:46:39 UTC
Git commit 2694839099c3a0e9da3682569e1bd569247c3ae8 by Roman Gilg.
Committed on 11/06/2018 at 20:46.
Pushed by romangilg into branch 'master'.

Remove pointer constraint on resource unbind

Summary:
A client might delete its pointer lock/confinement object. This is supposed to
directly remove the pointer lock/confinement in KWin, but did not explicitly
until now.

Test Plan:
Tested manually with Neverball, Nexuiz and the new pointer constraints test
application. The pointer constraints autotest is also appended.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, graesslin, kwin

Tags: #kwin

Maniphest Tasks: T8923

Differential Revision: https://phabricator.kde.org/D13466

M  +42   -0    autotests/integration/pointer_constraints_test.cpp
M  +1    -1    input.cpp
M  +6    -3    pointer_input.cpp
M  +3    -1    pointer_input.h

https://commits.kde.org/kwin/2694839099c3a0e9da3682569e1bd569247c3ae8
Comment 8 Mayeul C. 2018-09-10 14:22:34 UTC
*** Bug 398421 has been marked as a duplicate of this bug. ***
Comment 9 Alexander Mentyu 2018-09-12 10:10:33 UTC
Reopening - bug is reproducible in duplicate
Comment 10 Roman Gilg 2018-09-15 00:36:08 UTC
Closing again. The other bug report is on 5.13. The patch lands in 5.14.