Summary: | Xwayland apps get Tab keyboard events even when they should be filtered out by event filter | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | mailport+kdebugs |
Component: | input | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex, aurelien, bluelkshell, brunoades, bugs.kde.org, cameron.w, claudio, contact, descartavel1, elman, figueroa628, greg.martyn, jbeckman1974, julian, kde, kdebugs, kdedev, mailport+kdebugs, mg05182-kde, moslike6, nate, nyanpasu64, postix, ricardo, sami.kyostila, schierkevin, sebastian.pb31, sebbarg, srikarbharadwaj0, superrudra1601, tandiv15.bansal, tchiot.ludo, vaiogames18, web, xaver.hugl, xnaxdy, Xtian7489 |
Priority: | HI | Keywords: | regression |
Version: | 6.0.3 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=478556 | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/8fd4476ff1848ce7ce4d3573224fc4893ae8339d | Version Fixed In: | 6.2.0 |
Sentry Crash Report: | |||
Attachments: | Video of a window receiving TAB characters while cycling windows. |
Description
mailport+kdebugs
2024-04-03 16:23:06 UTC
Can confirm, though it only happens if you set X11 apps to always be able to read all keystrokes (In reply to Zamundaaa from comment #1) > Can confirm, though it only happens if you set X11 apps to always be able to > read all keystrokes Wow - thanks Zamundaaa. That actually fixes my problem (even though I had the option "Any key typed while Control/Alt/Meta are pressed" selected). But switching to "Never" completely fixes it. You can't believe how annoying the last week was, I think in every project of mine are now random tabs committed. Really thank you - lol, send me you postal address and I'll mail you a box of chocolate. Also happens for me when using the overview feature or desktop grid. First input gets properly intercepted while all following keys "leak" through. *** Bug 486263 has been marked as a duplicate of this bug. *** Trivial way to reproduce: Focus an XWayland window and Alt+Tab with default XWayland snooping settings. The app gets sent tab keys. *** Bug 489325 has been marked as a duplicate of this bug. *** *** Bug 489382 has been marked as a duplicate of this bug. *** *** Bug 488870 has been marked as a duplicate of this bug. *** This was exposed by changing the XWayland snooping move away from "Never". *** Bug 489609 has been marked as a duplicate of this bug. *** *** Bug 489631 has been marked as a duplicate of this bug. *** Created attachment 171308 [details]
Video of a window receiving TAB characters while cycling windows.
I see it as well. Here is a simple way to reproduce using vscode (it affects chrome as well, but is very easy to see in vscode) 1. Settings -> Task Switcher: disable "show selected window" (makes it easier to see what is happening) 2. start vscode with an empty document 3. press alt-tab repeatedly and observe the tab character "bleeds through" to vscode. *** Bug 489757 has been marked as a duplicate of this bug. *** Add backtick to the list: when pressing Alt+` + ` (backtick twice) the original window gets the backtick. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6074 *** Bug 490754 has been marked as a duplicate of this bug. *** I actually started to report new bug when I stumbled upon this one, so here is my description which seems pretty much like what is described here: When I use Alt+Tab to switch windows, keystrokes are sent to last active window and appear as spaces. For example, I use RubyMine, have code `<MessageBox messages={messages}/>` and I leave cursor between `=` and `{`. Then I use Alt+Tab to loop through all open windows (13 window) and get back to RubyMine, I have code `<MessageBox messages= {messages}/>` so 25 spaces are added. So far I have seen this issue with RubyMine, Typora. Slack and Spotify act as if they are receiving Tab keystrokes. All of these applications are xclients. Git commit 8fd4476ff1848ce7ce4d3573224fc4893ae8339d by David Edmundson. Committed on 02/08/2024 at 09:31. Pushed by davidedmundson into branch 'master'. wayland: Move XWayland key forwarding into a filter We optionally send some keys to xwayland through the filter when no x11 client has focus. This allows shortcut handling in X11 apps to work. When kwin is grabbing keys we don't necessarily want X11 to sniff these keys as things can get out of sync. A key place is the tabbox. The X11 client sill has focus, but xwayland is not active. This means we pass tab keys to X which then go to application incorrectly. Part of this patch changes the tabbox filter to not intercept the alt key release event. This ensures xwayland's concept of pressed modifiers stays in sync. M +36 -0 autotests/integration/x11keyread.cpp M +1 -0 src/input.cpp M +1 -0 src/input.h M +50 -49 src/xwayland/xwayland.cpp M +2 -2 src/xwayland/xwayland.h https://invent.kde.org/plasma/kwin/-/commit/8fd4476ff1848ce7ce4d3573224fc4893ae8339d *** Bug 491287 has been marked as a duplicate of this bug. *** I see that it "Version fixed in" says 6.2.0, the next major release, which is still some time off. Would it be possible to cherry-pick it into some of the 6.1 bugfix releases? (In reply to ⭐️NINIKA⭐️ from comment #21) > I see that it "Version fixed in" says 6.2.0, the next major release, which > is still some time off. > > Would it be possible to cherry-pick it into some of the 6.1 bugfix releases? At Nate's blog I noticed that this only happens with default setting "When Alt+Tabbing through windows, tab keystrokes no longer leak into XWayland-using apps when using default XWayland app keyboard snooping setting". So I just went to settings and selected to never send any keystrokes to X11 apps and that works for me. I don't use any X11 app that would need those keystrokes. *** Bug 492272 has been marked as a duplicate of this bug. *** *** Bug 492116 has been marked as a duplicate of this bug. *** *** Bug 492037 has been marked as a duplicate of this bug. *** (In reply to elman from comment #22) > (In reply to ⭐️NINIKA⭐️ from comment #21) > > I see that it "Version fixed in" says 6.2.0, the next major release, which > > is still some time off. > > > > Would it be possible to cherry-pick it into some of the 6.1 bugfix releases? Please KDE devs, if it's not too invasive it'd be nice to have this backported to 6.1.x > At Nate's blog I noticed that this only happens with default setting "When > Alt+Tabbing through windows, tab keystrokes no longer leak into > XWayland-using apps when using default XWayland app keyboard snooping > setting". So I just went to settings and selected to never send any > keystrokes to X11 apps and that works for me. I don't use any X11 app that > would need those keystrokes. Thanks for pointing out that workaround! It never occurred to me to go looking through the settings. I don't know what side effects this setting might have but at least I won't lose my mind now 😁 *** Bug 492491 has been marked as a duplicate of this bug. *** *** Bug 493956 has been marked as a duplicate of this bug. *** *** Bug 492361 has been marked as a duplicate of this bug. *** *** Bug 493221 has been marked as a duplicate of this bug. *** *** Bug 493386 has been marked as a duplicate of this bug. *** |