Bug 489382 - Currently windows maintain focus while Alt+Tab is executed in KDE Plasma
Summary: Currently windows maintain focus while Alt+Tab is executed in KDE Plasma
Status: RESOLVED DUPLICATE of bug 484992
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: 6.1.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-28 15:56 UTC by cristian
Modified: 2024-07-20 12:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cristian 2024-06-28 15:56:20 UTC
Issue Description: Task Switcher Behavior in KDE Plasma

I'm experiencing an issue with the task switcher in KDE Plasma while using the Alt + Tab key combination to switch between windows. Normally, pressing Alt + Tab once correctly switches windows. However, if I hold Alt and press Tab multiple times, especially within a text editor, instead of switching windows, it inserts multiple tab characters into the text.



***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY


STEPS TO REPRODUCE
1.  Open multiple windows or applications in KDE Plasma.
2. Press Alt + Tab to bring up the task switcher.
3. While holding Alt, press Tab multiple times.
4. Notice that within a text editor, this action inserts multiple tabs into the text instead of switching windows.

Expected Behavior:
The task switcher should take focus to enable seamless navigation between open windows.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: kde neon
(available in About System)
KDE Plasma Version: 6.1.1


ADDITIONAL INFORMATION

This issue disrupts productivity when multitasking and navigating between applications. I've reviewed keyboard shortcut settings and window focus configurations in KDE Plasma, but the problem persists.
Comment 1 RedBearAK 2024-06-29 19:51:32 UTC
I am also observing this on Fedora (with Plasma 6.1.1) where it happens relatively frequently, and I also saw it a couple of times in openSUSE Tumbleweed (also with the Plasma 6.1.1 update). 

When it starts happening, it can be observed in any app window that will do something in reaction to a Tab key press, such as inserting 4 spaces, which most of my code editors and text editors are set to do. Obsidian will indent a line or selected block of text when it sees a Tab key. 

It doesn't happen each time, but when it does I can keep holding the Alt key and just keep Tabbing through the "Large Icons" layout and see the app window behind the tab box receiving another Tab key press each time. 

When switching to Alt+Shift+Tab to move through the icons in reverse (without releasing Alt), the app window behind doesn't seem to ever react with a Backtab operation, but going back to Alt+Tab will continue to send Tabs into the app window, until I release the Alt key and actually switch (or stay in the same app because that was the selected icon). 

The task switcher dialog otherwise seems to act normally as far as moving to the next icon with each Tab, and switching to the selected window/app. 

Here is maybe an important addition, though it shouldn't come as a surprise. Sometimes the same thing happens with the Grave key (the backtick/tilde key above Tab on the US keyboard layout). I will end up with some Grave characters "````" in the window behind the tab box. For as many times as I hit Tab without releasing Alt. 

So there is a general input isolation problem happening with the tab box, with the non-modifier key. 

There is a line that will spam the journal for as long as I hold the Alt key with the tab box visible. I only noticed this while using the default visualizer that shows window previews, and a terminal window was open in the background showing the journal. 

```sh
Jun 29 04:20:31 fedora-3700u kwin_wayland[4291]: kwin_scene_opengl: 0x3: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
Jun 29 04:20:31 fedora-3700u kwin_wayland[4291]: kwin_scene_opengl: 0x3: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
Jun 29 04:20:31 fedora-3700u kwin_wayland[4291]: kwin_scene_opengl: 0x3: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
Jun 29 04:20:33 fedora-3700u kwin_wayland[4291]: kwin_scene_opengl: 0x3: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
Jun 29 04:20:33 fedora-3700u kwin_wayland[4291]: kwin_scene_opengl: 0x3: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
Jun 29 04:20:33 fedora-3700u kwin_wayland[4291]: kwin_scene_opengl: 0x3: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
Jun 29 04:20:33 fedora-3700u kwin_wayland[4291]: kwin_scene_opengl: 0x3: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
Jun 29 04:20:33 fedora-3700u kwin_wayland[4291]: kwin_scene_opengl: 0x3: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
Jun 29 04:20:33 fedora-3700u kwin_wayland[4291]: kwin_scene_opengl: 0x3: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
```

Those lines will just keep going as long as I hold the Alt key. 

Then when I release the Alt key and do the window switch, these lines will appear. Seems to be the same number of them each time. 

```sh
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
Jun 29 11:47:39 fedora-3700u plasmashell[4494]: org.kde.plasma.keyboardindicator: Unknown key Qt::Key_Alt
```

I don't know if these lines in the journal actually have anything to do with the input isolation issue, or are just coincidental. But they are consistently happening when task switching with Alt+Tab.
Comment 2 Nate Graham 2024-06-29 20:15:48 UTC

*** This bug has been marked as a duplicate of bug 484992 ***