SUMMARY Alt-tabbing between two windows sometimes moves focus to a third window, making the alt-tab non-deterministic, impairing workflow. STEPS TO REPRODUCE Not exactly sure how to reproduce, it seems probabilistic, it sometimes takes 15-20 times to alt-tab to trigger the bug. 1. have three windows open 2. press alt-tab 15-20 times to switch between two windows, releasing alt key after each window switch 3. observe you start switching to the third window after a number of times. OBSERVED RESULT alt-tabbing between two windows sometimes starts switching to a third window EXPECTED RESULT alt-tabbing between two windows always switches between the two latest windows that had focus SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.20.3 KDE Frameworks Version: 5.76.0 Qt Version: 5.15.1 ADDITIONAL INFORMATION Reported against versions as specified above, but this bug is happening for at least half a year already. Using KWin on Xorg.
That's weird, never experienced this.
I see it more often when activating a window (one that is not the two most toplevel windows) from the taskbar
I tried for two minutes, pressing ALT-TAB, the releasing ALT. Must have been more than a hundred times. Always switches between the two last recently displayed applications. Maybe the TAB key on your keyboard doesn't work properly and sometimes generates multiple key events for one press? Can you reproduce this issue in KDE 5.23 with a different keyboard?
I will try a different keyboard once I can find my old one in the basement. In the meantime, doing a quick test again with 5.23.3 hits this issue almost immediately.. This is my setup: - Wayland session - Standard US keyboard layout - Two monitors - Couple of Firefox windows and KDEPIM using XWayland - Some native wayland windows like Konsole, Dolphin - maybe relevant Task Switcher settings: sort order = recently used. filter windows = current desktop, current activity. visuallization = breeze, show selected window enabled
Thank you for your feedback. My setup is very similar to yours, except that I only have one monitor und use Breeze Dark. I just thought of one other thing. What is you window activation policy (configured in window behavior)? Are you running any app that might want to (temporarily) steal the focus and hence change the recently used order? Is it always the same app, that gets mistakenly picked? I'm just trying to narrow it down as much as possible. Maybe you can just start three native Wayland apps and try, if you can still reproduce it. That would mean it's happening independent of Xwayland. Does the same issue happen if you use a different visualization, e.g. Breeze Dark, which I am using? Can you reproduce it on an X11 session as well? Looking forward to hear what a test with the keyboard in the basement shows.
Uh, one more thing ;-) Can you reproduce the issue with a newly created user without changing any settings for that user? Are you running any desktop effects?
Adding a bit more info before testing your suggestions: - Window activation policy: Click to focus - Focus stealing prevention: None - Click raises active window: enabled (other checkboxes in Focus tab disabled) - Desktop effects: Slide back, Fade, Squash, Translucency (and a few others, but unlikely related to focus) One interesting thing I noticed, I used 'xev' to test if my Tab key was creating extra events. It didn't, but after using 'xev' it seems alt-Tab is working as it should. So maybe some undefined state on the XWayland side of things gets initialized?
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!
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!
Different keyboard tested (hotplugged next to existing keyboard): issue still present
Interesting.. It seems the problem is triggered when I have one specific firefox tab opened (containing a webapp, not static content). If another tab is active on that firefox window (with the webapp tab still running in the non-active tab), the problem disappears. The problem still appears, if the offending tab is active and if the window is not focussed between alt-tabs between two other windows.