Task Switcher: raise only last used window

Hi,

I am looking for help with Task Switcher behavior for one app with multiple windows and displays.

My scenario:

  • browser window 1 on display 1
  • browser window 2 on display 2
  • I open terminal window, move it to display 2 and start a long running job I want to keep eye on, so I need this terminal window visible on display 2
  • I click or Alt+Tab to browser window 1 on display 1 to continue using it

What happens:

  • browser window 1 on display 1 becomes active (great!), but browser 2 on display 2 rises to top as well, completely blocking view of the terminal window.

What I’d like to happen:

  • browser window 1 on display 1 becomes active, nothing changes on display 2 and I can see the terminal windows just as and where I left it.

Is this possible? I looked into Task Switcher and Icons-Only task manager widget settings, but I did not find any switch that would affect that specific behavior. It behaves identically, both when windows are grouped (both in Task Switcher and in task manager widget) and when they are separated.
Current settings make it impossible to have windows of two separate apps on top / in front (without minimizing the “offending” window).
I do not use any virtual desktop (technically there is just one: “Desktop 1” in System Settings).

System: Bazzite 44
KDE Plasma Version: 6.7.4
KDE Frameworks Version: 6.29.0
Qt Version: 6.11.2
Kernel Version: Linux 7.2.3-ogc3.1.fc44.x86_64
Graphics Platform: Wayland

Hello :waving_hand:
This toggle should help when you right click the top bar.

If doesn’t appear and you instead see the browser native toolbar (such as the firefox toolbar) then right click on the right click again and it should appear.

It basically keeps your window above other windows even if the window below is focused.

This also sounds like a weird behavior with your browser. I’d recommend either seeing if other people are having this behavior and if there’s a way to disable it.

this is the behavior i would expect when you have only one instance of a browser open.

opening a new tab in a separate window, is still only one instance of the browser.

if you open a link in a new Private window then it creates a separate instance of the browser that you can control separately.

The issue is not connected to browser (LibreWolf from Flatpak in this instance) or any specific app - I just retested that behavior with Konsole and Dolphin and the results are the same: switching (with mouse click or Alt+Tab) to any window of an application brings all windows of that application to front on all monitors.

This is basically the exact opposite of this 6 years old post on askubuntu (“KWin - Modifying the Task Switcher to raise all windows” - I cannot paste links) where the OP was seeing the behavior I’d like to see and they were trying to get the current behavior.

@Z7RAGE: thanks for pointing out “Keep Above Others” option - it is there, works as described and I can use it as a temporary workaround / kludge. I still would love to know how / where to get universal solution, without marking each specific window above others each time.

Interesting, I’ve only experienced this behavior of all windows from the same application appearing in front with the Unity game engine and not any browser I’ve used.

Oh I see

Unfortunately I can’t replicate the scenario you’re facing on my single screen laptop, and this isn’t default plasma behavior (on Fedora at least). I’ve looked at the window management settings page and I cant find what setting in plasma would need to be changed so that only the window you choose gets raised.

If I had to guess you may have a kwin script enabled which makes this functionally possible. You can try disabling them, logging out, logging back in and then see if the issue persists.

Another thing you could try is to remove your plasma config files which will make it so plasma works as if you’ve just installed Bazzite tho you would need to reconfigure everything related to plasma (like your wallpaper and panel). I can link you to a repo with locations for those files if you want.

If none of those fixed your issue you can make the workaround less tedious by configuring your titlebar to have a one click button that puts the window on the top all the time. (“Keep above other windows”)

This won’t appear in windows that apply their own window decorations however.

tested with both zen and firefox and opening a link in a “private” window will cause the windows to act independently

@Z7RAGE: I will be very grateful for the link to those KWin scripts. I don’t mind resetting things to Bazzite’s defaults, as I barely changed anything (moved panel to left of screen and installed Toshy). Removing Toshy (and reboot) did not change anything.

@skyfishgoo: That is interesting - in my case LibreWolf’s private window is treated the same as normal windows.

Where to find Kwin scripts

You can access all your enabled Kwin scripts from the Window managment/Kwin Scripts page in the system settings.

You can disable any you may have enabled by unchecking the box. (Note you may need to log out to see those changes take effect)

Currently I just have the Dynamic workspaces script enabled that I downloaded online which just creates virtual desktops for me automatically.

Resetting plasma to bazzite defaults

General reminder not to run commands in the terminal unless you know what it does

If after trying that you still aren’t satisfied you.

Put shalva97/kde-configuration-files in your search engine and find the link to the Github repo, it contains a README.md document which lists most if not all the locations/directories where Kde config files are stored. Go through them one by one and delete them with the terminal and then restart (log in log out) your computer.

Here’s an example on what you would write in the terminal,
image

rm (remove command )
-r remove directories (just in case the thing you’re removing is a folder, files still work)
Then the path to remove

Make sure you are in your home directory /home/youruser before running this. Type pwd if you aren’t sure and it will output it for you.
Also don’t remove /etc/NetworkManager/system-connectionthis contains networking related data like proxies so you would have to re enter that data if you remove it.
It also requires you to run the rm command as sudo.

Wow - bullseye! I’ve missed that part of Settings and it was exactly that, even with a handy description:

Disabling that script did the trick and windows now behave as I wanted them to.

Thank you!