SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** Create a window rule for an app to start on another virtual desktop. Launch that app, and you got switched to that desktop. STEPS TO REPRODUCE 1. System Settings -> Window Management -> Window Rules Add rule: - window class: substring match -> konsole - virtual desktops: apply initially -> 5: Desktop 5 2. Launch konsole when I am on Desktop 1 OBSERVED RESULT It switched to Desktop 5. EXPECTED RESULT It should not switch to Desktop 5. It should stay on Desktop 1 and the taskbar should have a highlighted Konsole entry. (Same as on X11) (Or at least give users a choice whether to switch to that desktop) SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: 5.18.3-gentoo-x86_64 / 5.24.5 (available in About System) KDE Plasma Version: 5.24.5 KDE Frameworks Version: 5.94.0 Qt Version: 5.15.4 ADDITIONAL INFORMATION On Fvwm the behaviour to not switch desktop on such app launching is called `SkipMapping`. It's a pretty useful feature.
So you want it to launch an app in another desktop but *not* take you there? So then you have to manually switch desktops to see it? Why?
(In reply to Nate Graham from comment #1) > So you want it to launch an app in another desktop but *not* take you there? > So then you have to manually switch desktops to see it? > > Why? Yes. If I launch some app that I know will take some time to appear, I would like to continue with my current work, without being interrupted by the newly-opened window. Plus, this is and has always been the behaviour on X11. I am so used to it. It is also implemented in other window managers like fvwm.
Moreover, this feature will be very useful if you *autostart* some apps and just want them to start on other desktops, while keeping the initial desktop clean.
Thanks. The fact that it's different between X11 and Wayland doesn't sound right, regardless of what the currently intended behavior is (I don't know what it is). It's also possible we could make this configurable. I'm CCing someone who is currently working on that for something different but related.
The related thing mentioned in the previous comment is https://invent.kde.org/plasma/kwin/-/merge_requests/2201, bug report https://bugs.kde.org/show_bug.cgi?id=438375 XFCE has this with "Do nothing" as a third option: https://unix.stackexchange.com/questions/97918/stop-browser-window-from-switching-workspace-and-getting-focus-when-opening-a-li/98432#98432 I suppose one could do that here too. The setting I just talked about here is about window *activation*. I don't know if *addition* of a window in the scenario described in the OP also triggers activation or which parts of it exactly, and what is responsible for the different behavior between X11 and Wayland. I can try to look into it. For those who would prefer the desktop not to switch, if such a "Do nothing" setting were to take effect not only on newly launched windows, but also cases where an already existing window on a different desktop gets activated, would this be a problem ?
If I am not mistaken, what makes the difference is that Workspace::addWaylandWindow calls Workspace::activateWindow which in turn does the desktop switching (which is target by the related MR), whereas Workspace::addX11Window does not. Why it is done that way, what the "right" behavior in this scenario would be and how to change this without breaking something else, someone more experienced than me needs to say.