KDE no longer automatically switches desktops

kdeplasma5virtual-desktop

Background

I have been using Linux Mint KDE v17.3 (Plasma v4.13.2) for a number of years. I keep Firefox open in one virtual desktop and Thunderbird open in another. If I receive an email in Thunderbird containing a link and click on the link, the link opens in Firefox and Plasma automatically switches desktops to view it.

Symptom

I just installed Kubuntu 18.04 with Plasma 5.12.7. It behaves differently, and it looks like recent Plasma versions on other distros are similar.

  • With the same virtual desktop setup, clicking a link in Thunderbird opens the link in Firefox but does not switch desktops. The Task Manager icon changes color to indicate the activity on the other desktop, but you need to manually switch desktops to view it.
  • If Firefox is not already open, clicking the link in Thunderbird will launch Firefox (or a different browser if selected), in the same desktop as Thunderbird and switch focus to the browser. Similarly, if the browser is already open in the same desktop, focus will switch to it.

The only difference in behavior is that Plasma will no longer switch desktops if needed to make the browser visible.

Additional testing

  • I've tested the behavior on two computers and a number of other distros using recent versions of Plasma (Mint 19 with the Kubuntu's Plasma 5.12.7 desktop, Neptune [KDE 5.12.7 on Debian], openSUSE v42.3 w/Plasma 5.8.7, Manjaro w/Plasma 5.15.0). They all behave the same way as Kubuntu. I also tested it in a live session of KDE Neon v5.12.4 and that behaved the same way.
  • I've also tested this with sources of links other than Thunderbird and with other browsers and the behavior is the same.
  • The style of desktop arrangement (grid, cube, etc.), and type of switching animation have no effect on the symptom.

So the source appears to be recent versions of Plasma. It isn't clear whether this is new intended behavior for Plasma or a bug. I couldn't find any references to this behavior in online searches.

Is there a way to restore the previous behavior of automatically switching desktops?

Best Answer

KDE Desktop Switching

Your problem is underlaid with the "focused" window situation, nothing changed on the new version of KDE but new features have been added (i am referring to the changes done to the focus stealing feature)

What's happening is when your window is activated, as it was not activated by an "active selection" it does not get the focus and thus the desktop is not automatically switched.

Solution

Change the Focus stealing prevention settings to none and your problem will be fixed

Open/run systemsettings5 > Window Management > Window Behavior > Set focus stealing prevention to none

Alternative solution

Focus stealing feature can be set on per window/application: right click on the title bar of firefox for instance and select "More actions" > "Special window settings" then in "apparence & fixes" you can customise the focus stealing setting for firefox.

With this solution you could keep the focus stealing prevention feature and also the old behavior. Also in the same setting location you can set firefox to always start on a specific desktop if this would match your needs

Related Question