Summary: | Windows do not stay on the virtual desktop they are on | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Riccardo Robecchi <sephiroth_pk> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 80p3fy75dc, bugs.kde.org.trustful938, bugs, bugskde, bugzilla-kde, ele.lundell, g111, kde.kfoar, kde, kdebugs, kinofhek, luigi.toscano, natalie_clarius, nate, nicolas.fella, peter, tomenglund26 |
Priority: | NOR | ||
Version: | 5.26.4 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/commit/a40dd9a1586c768ee956f193d2d70ec5e66c2cbe | Version Fixed In: | 5.27 |
Sentry Crash Report: |
Description
Riccardo Robecchi
2022-12-13 10:58:35 UTC
Please make sure you have System Settings > Window Management > Window Behavior > Advanced > When activating a window on a different dektop: set to Switch to that Virtual Desktop. Can reproduce even with said setting enabled, but only on X11. Are there any other applications this happens with? I'm also seeing this, with the same setting. Having said that, there are two options for that setting, i.e. "Switch to that Virtual Desktop" and "Bring window to current Virtual Desktop". Neither sounds like the old (and IMO preferred) behaviour, which is "neither", i.e. leave the window there and don't switch me. I presume you mean other applications that move Virtual Desktops. I only see it with Firefox. OTOH Signal and Pidgin still have the old behaviour (of "neither"). However, I can also trigger this bug from links in other applications, e.g. from the Terminator terminal emulation. I am wondering about this issue, too. Again with firefox here. It is a little bit annoying, because I do not want my windows being moved around automatically. This makes them hard to find later. Operating System: Kubuntu 22.04 KDE Plasma Version: 5.24.7 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.3 Kernel Version: 5.15.0-56-generic (64-bit) Graphics Platform: X11 Graphics Processor: Mesa IntelĀ® Xe Graphics The mentioned setting System Settings > Window Management > Window Behavior > Advanced > When activating a window on a different dektop: set to Switch to that Virtual Desktop. is not available in my System Settings. i personally always have firefox on the 4th virtual desktop, for now i worked around this by making a special application setting/rule that always forces it to be on the 4th virtual desktop. now it doesnt move around when i open urls in other virtual desktops. Same issue here (Arch Linux / Gentoo / Plasma 5.26.4) with Firefox when opening any external link from any other program. Firefox keeps being moved to the workspace where the other program I'm opening the link from is located. Settings > Window Management > Window Behavior > Advanced > When activating a window on a different Virtual Desktop: "Switch to that Virtual Desktop" was already the default. The old behavior was the best in my opinion. When opening an external link from another program, I just had the Firefox task manager icon background color changing so that I know something was happening and that's it. No window moved, no workspace switching/focusing whatsoever. Hope it'll be fixed. One thing I've noticed is that Firefox stays on the same virtual desktop it is on if I click on a link on Thunderbird. I have also tried setting Vivaldi as the default browser, and it works as expected (the window is kept on the virtual desktop it is on). Given this, is it possible that somehow it is actually Firefox at fault here, rather than KWin? It seems having to do with the command that is used to open a firefox window: https://www.reddit.com/r/kde/comments/zm6gag/prevent_a_browser_window_from_changing_virtual/ in short: With "xdg-open" the window is moved. With "firefox" it is not moved. With "XDG_CURRENT_DESKTOP=X-Generic xdg-open" the window is not moved. Nice find @g111. I can confirm that all of those commands behave the same for me See https://bugs.kde.org/show_bug.cgi?id=463410#c5 for the explanation *** Bug 463410 has been marked as a duplicate of this bug. *** Git commit cf81be19a8334b26a3cd8069294386d94750bee8 by Vlad Zahorodnii, on behalf of Nicolas Fella. Committed on 04/01/2023 at 11:30. Pushed by vladz into branch 'master'. [kprocessrunner] Don't specify which desktop the app should be launched on It should be up to the window manager to decide which desktop newly launched applications should go to Usually that will be the current desktop, but for example when activating an already running app KWin allows to switch the current desktop to the one the app is running Specifying the current desktop here breaks that M +0 -5 src/gui/kprocessrunner.cpp https://invent.kde.org/frameworks/kio/commit/cf81be19a8334b26a3cd8069294386d94750bee8 Git commit a40dd9a1586c768ee956f193d2d70ec5e66c2cbe by Vlad Zahorodnii, on behalf of Nicolas Fella. Committed on 04/01/2023 at 12:12. Pushed by vladz into branch 'master'. Only make startup notification change the virtual desktop if requested Startup notifications optionally contain the target desktop the app should be launched to. If present the window is sent to that desktop, if not it is sent to the current desktop. Later in Workspace::activateWindow we check if the window is on the current desktop, and if not we either move it to the current desktop or switch to the window's desktop depending on user preference. However, this is broken because the window was already moved to the current desktop. To avoid this only move the window if specifically requested by the startup id. M +4 -9 src/activation.cpp https://invent.kde.org/plasma/kwin/commit/a40dd9a1586c768ee956f193d2d70ec5e66c2cbe *** Bug 464280 has been marked as a duplicate of this bug. *** *** Bug 464924 has been marked as a duplicate of this bug. *** So does the fix require both kio 5.103 and Plasma 5.27? (In reply to Luigi Toscano from comment #17) > So does the fix require both kio 5.103 and Plasma 5.27? It looks like it. I am currently on Plasma 5.27.1 and Frameworks 5.103.0 and the bug is not there anymore. |