Bug 430713

Summary: After clicking a link in app with a browser on another virtual desktop, the desktop is not switched
Product: [Plasma] kwin Reporter: Mikhail Zolotukhin <mail>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: natalie_clarius, nate, nicolas.fella
Priority: NOR    
Version: 5.20.4   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1767546
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mikhail Zolotukhin 2020-12-22 17:51:26 UTC
SUMMARY

After clicking a link in app with a browser on another virtual desktop, the desktop is not switched


STEPS TO REPRODUCE
1. Open browser (Firefox in my case) on one virtual desktop
2. Place an app with clickable links on another virtual desktop (i.e. Neochat, Telegram etc)
3. Click on any link

OBSERVED RESULT

Link is opened in a browser, but the virtual desktop is not switched to another.


EXPECTED RESULT

Desktop is switched to another desktop.


SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.20
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

I noticed, that changing the setting "Focus stealing prevention"
 to None helps, and therefore I have two questions:

1) Why isn't this setting a default?
2) It's unclear what exactly the settings "None, Low, Medium, High, Extreme" mean. May there can be a tooltip, like in Fonts KCM, that explains those options?
Comment 1 Nate Graham 2021-01-05 14:50:27 UTC
The mysteries of the focus stealing prevention settings are probably a topic for a separate bug report, though I agree.

However this is probably a client bug. Firefox needs to either pass along its window ID with the activate request so that KWin knows that it's a legitimate request, or it needs to brute-force the system by doing forceActivateWindow() instead of activate().

I'm not 100% sure though, so I won't close the bug.
Comment 2 Nicolas Fella 2022-09-10 23:55:34 UTC
On Wayland this works if both apps support xdg-activation. NeoChat does, Firefox does not (correctly, see https://bugzilla.mozilla.org/show_bug.cgi?id=1767546)

On X11 it's conceptually similar