Plasma window focus when using task switcher across desktops - behaviour changed after latest stable update

Following the 2024-11-30 Stable Update: When using alt-tab to switch to a window on another virtual desktop, the window being switched to does not indicate focus correctly.

Example:

  • 2x windows (e.g. dolphin + konsole) on different virtual desktops.
  • If konsole window has full focus, the cursor is solid. If dolphin has full focus, select item is solid colour.
  • Type something in konsole.
  • alt-tab (task switcher) to dolphin. Selected item is “weak” colour. Press any key and selected item indicates full focus.
  • alt-tab (task switcher) to konsole. Cursor is not solid. Type anything. Cursor becomes solid.

Previous behaviour was that the window being switched to would immediately gain the “full focus” without a key being pressed. This is still the behaviour today if the two windows above are on the same virtual desktop. I am using Plasma Wayland session. I have all window borders/decorations disabled. I tried deleting all plasma-related caches. This corrected another issue I had after this update, but not this issue.

It’s a weird one, and slightly difficult to explain. Hope this is clear …

1 Like

Hi, good to see you again - it looks like you’ve been happy at least since April :wink:

I am testing this now - and viewing the settings also.

If I highlight a file in Dolphin, activate Firefox, then click on the Dolphin titlebar, it is still highlighted (full bright).

Furthermore, if you use MetaAlt:arrow_left: to switch windows (same desktop) the highlight is, indeed, preserved.

However, you are correct - when using AltTab switching, the focus is not preserved.

I would take this up with the KDE Discuss forum.

Thanks - yes I have had zero issues for a while!

Ok, I’ll try looking/asking upstream. (Just tried an endeavour vm and it seems to have the same issue.)

I can confirm it’s real. I had not noticed because I don’t use ALT + TAB

2 Likes

Additionally, this is only an issue with KDE.

Code, Kwrite, Konsole, Dolphin.

Code retains highlighting, but KDE applications lose it.

Fascinating.

1 Like

Not restricted to KDE apps - emacs is affected for me.

Possibly related to this (although this doesn’t mention switching virtual desktops)
https://bugs.kde.org/show_bug.cgi?id=495741

I’m not sure if I understand the issue here, but I did notice some weird alt-tab behaviors lately on Plasma. Namely, usually when I alt-tabbed, the previous window was focused. So for alt-tab it matters the current and previous window. However, lately it instead of raising previous window, it did with different one. As if the order of the windows (that we see when pressing and not releasing alt after tab) was fixed somehow and independent of the previously focused window.

I’m not sure if the issue is still there, because I started more relaying on clicking on windows in a taskbar or using overwiew effect instead alt-tab.

Anyway, something weird was happening. However, since I’m on unstable branch, there were some KDE updates lately, so I’m not sure if that wasn’t already fixed.

Good to know.

It does seem that the usage of Alt-Tab is less these days (e.g. there have only been 2 3rd-party Plasma6 Task Switcher styles released). This, coupled with the fact that the default settings in Plasma for Alt-Tab only switches between windows on the same virtual desktop could explain why this doesn’t affect too many people.

In my case, I have all title-bar and window borders removed and panel hidden. Windows are maximised or tiled half/quarter screen via keyboard shortcuts across 4 virtual desktops and I almost always switch between windows using Alt-Tab. Therefore, I almost immediately noticed this weirdness after the recent upgrade and it is quite off-putting - it feels like I don’t know for sure which window has focus until I type something …

1 Like

I’m on Stable, your on Unstable so you should get the fix, if there is one first.

OK, figured out the problem on my side, and it has nothing to do with your issue.
Basically, the problem was with multimonitor setup, so alt-tab was always switching to the window focused on another monitor and never on the previously active window on the current monitor. This can be changed in settings to filter alt-tab order to windows in the current monitor, which fixes my problem.

Also, if someone is using virtual desktops, there can be a filter for that too.

You are correct that this is a possible workaround. However, in my case, I specifically want to switch between windows across different virtual desktops using Alt-Tab, so I have this filter disabled.

I’m not seeing any issue here. Alt+tab switches between windows with the same apparent background highlighting, and everything focuses as it should.