[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #23 from Martin Flöser --- (In reply to Roman Gilg from comment #22) > When testing this out I encountered one time a session breaking failure: > ASSERT: "m_spy.isNull()" in file > /home/roman/Entwicklung/kde/source/kde/workspace/kwin/onscreennotification. > cpp, line 204 > > I assume it's about the notification in upper left corner that the pointer > constraining is active, but could be unrelated to the change here. Never > seen it before though. It's a bug, but unrelated. Unfortunately it's one of those things we cannot test in the integration tests as it requires QtQuick and that cannot be run on the CI system as we don't have OpenGL there. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #22 from Roman Gilg --- When testing this out I encountered one time a session breaking failure: ASSERT: "m_spy.isNull()" in file /home/roman/Entwicklung/kde/source/kde/workspace/kwin/onscreennotification.cpp, line 204 I assume it's about the notification in upper left corner that the pointer constraining is active, but could be unrelated to the change here. Never seen it before though. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 Martin Flöser changed: What|Removed |Added Resolution|--- |FIXED Status|REOPENED|RESOLVED Latest Commit||https://commits.kde.org/kwi ||n/229be65e4002987e2de0113ef ||9b7140492d2d681 --- Comment #21 from Martin Flöser --- Git commit 229be65e4002987e2de0113ef9b7140492d2d681 by Martin Flöser, on behalf of Martin Gräßlin. Committed on 12/05/2017 at 05:06. Pushed by graesslin into branch 'Plasma/5.9'. Improve the escape key handling for breaking constrained pointers Summary: So far KWin started to filter out the escape key as soon as it gets pressed. This was done by unsetting keyboard focus. The idea was to reset keyboard focus when it is only a short press and that then the keyboard state is correct for the application. But in practice this does not work. The only application currently supporting pointer constraints (Xwayland) does not do anything on a key which is pressed when gaining keyboard focus. The result is escape not working in pointer constrained Xwayland windows. This change addresses this problem by changing the interaction to only unset keyboard focus when our break constraints condition is met. This should also result in the application not handling the key release, but it means it gets the key press. Unfortunately I don't have a good way to test. Test Plan: None Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D5488 M +3-2autotests/integration/pointer_constraints_test.cpp M +5-3input.cpp M +1-1keyboard_input.cpp https://commits.kde.org/kwin/229be65e4002987e2de0113ef9b7140492d2d681 -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 Martin Flöser changed: What|Removed |Added Resolution|FIXED |--- Ever confirmed|0 |1 Status|RESOLVED|REOPENED --- Comment #20 from Martin Flöser --- Will be fixed with the patch going into repo -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 Rajdeep Nanua changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #19 from Rajdeep Nanua --- That works! Thanks a bunch, Martin. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #18 from Martin Flöser --- I updated the phab request. Given the autotest the escape key should be passed to the application now. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #17 from Martin Flöser --- So I analyzed the patch and it is quite similar to my change. The result is partially the same. The moving of the timer has the same effect as the removal of "input()->keyboard()->update();" in my change. The main difference is that passToWaylandServer happens in your change but not in my change. Although I assumed that a later filter would do that. This might explain why my change doesn't work. What your change doesn't support right now is the hiding of escape from the window on a long press which cancels the pointer grab. I guess we need the best of both approaches ;-) -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #16 from Martin Flöser --- I must say that I don't understand (yet) why moving the timer changes anything -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #15 from Rajdeep Nanua --- Created attachment 105427 --> https://bugs.kde.org/attachment.cgi?id=105427&action=edit p1.patch -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #14 from Rajdeep Nanua --- Moving m_timer->start to after passToWayland has been called seems to fix the problem while allowing to break out of pointer confinement by holding esc for 3 seconds. See p1.patch. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 Sandeep changed: What|Removed |Added CC||sandy.8...@gmail.com --- Comment #13 from Sandeep --- I am also facing the issue on KWin 5.9.5 and XWayland 1.19.3 -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #12 from Rajdeep Nanua --- Unfortunately, that patch did not fix the issue for me. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 Martin Gräßlin changed: What|Removed |Added Flags||ReviewRequest+ URL||https://phabricator.kde.org ||/D5488 --- Comment #11 from Martin Gräßlin --- Proposed patch: https://phabricator.kde.org/D5488 -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #10 from Martin Gräßlin --- After re-reading the code I think I understand the problem. We send a keyboard leave event to Xwayland whenever escape gets pressed. We need to delay it till we trigger. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #9 from Martin Gräßlin --- The bigger question is on the why it happens. The code should let short presses through and that is not happening. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #8 from Martin Gräßlin --- That this code segment is responsible for it was already obvious to me :-) -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #7 from Rajdeep Nanua --- Created attachment 104956 --> https://bugs.kde.org/attachment.cgi?id=104956&action=edit Workaround to get escape key working in games I narrowed down the problem to a specific problematic code in input.cpp. With escape-workaround.patch, escape key works. Hope that helps isolate the issue. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 Roman Gilg changed: What|Removed |Added CC||subd...@gmail.com --- Comment #6 from Roman Gilg --- I just tried it on KDE Neon with self compiled Xorg Server / XWayland from Git and Neverball, that shows a similar behaviour in the following way: * Start Neverball in XWayland mode: In main menu with mouse interaction everything fine. Esc works. Start a level and message "Pointer motion confined..." in the left up corner. Pointer motion is somewhat miscalculated though. Neither short or long press Esc does something. When the level finishes the message appears again shortly and the mouse cursor is shown again (end menu screen). I can't move the mouse cursor though. Long press Esc releases the mouse cursor and afterwards short Esc works again. * Start Neverball in Wayland native mode (export SDL_VIDEODRIVER=wayland): No message appears. Esc and everything else works. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #5 from Martin Gräßlin --- (In reply to Rajdeep Nanua from comment #4) > A short press and release. meh, a long press I would have understood what goes on. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #4 from Rajdeep Nanua --- A short press and release. -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #3 from Martin Gräßlin --- How are you pressing the escape key? A long press or a short press and release? -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 --- Comment #2 from Rajdeep Nanua --- I am using Xwayland 1.19.3 -- You are receiving this mail because: You are watching all bug changes.
[kwin] [Bug 378452] Escape key not detected by several games in wayland
https://bugs.kde.org/show_bug.cgi?id=378452 Martin Gräßlin changed: What|Removed |Added Flags||Wayland+, X11- Component|platform-wayland|input --- Comment #1 from Martin Gräßlin --- Which Xwayland version are you using? -- You are receiving this mail because: You are watching all bug changes.