Bug 469667 - [Wayland] Window raise on focus transfer is broken
Summary: [Wayland] Window raise on focus transfer is broken
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 5.27.4
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-12 14:58 UTC by Paul Elliott
Modified: 2023-05-15 18:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Elliott 2023-05-12 14:58:41 UTC
SUMMARY

If one clicks (for example) a web link in slack, one would expect the web browser to be raised to the top. As it is, focus does seem to be transferred, but the window is not raised, nor is the desktop changed to the correct one for the app, despite the status settings under "Window behaviour". This goes the same for any app that basically hands off focus to another app (1password manager from web browser, and so forth)

STEPS TO REPRODUCE
1. Open a web link from another application (messenger / terminal / etc)
2. Observe the web browser is not raised.

OBSERVED RESULT
Web browser is not raised to top, however auto-hide task manager does raise, and sometimes the relevant window gets highlighted.

EXPECTED RESULT
Web browser window raised to the top and given focus, and desktop changed to the correct one for the app, according to settings in "Window Behaviour"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.2.13-1-MANJARO (64-bit)
(available in About System)
KDE Plasma Version: 5,27.4
KDE Frameworks Version:  5.105.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION

This looks like it may be related to https://bugs.kde.org/show_bug.cgi?id=456056, but this appears to happen with any app that passes focus to another app.
Comment 1 Nate Graham 2023-05-15 18:40:03 UTC
On Wayland, for this to work, both the sending and receiving app need to correctly implement the xdg_activation_v1 Wayland protocol. When it fails, this means than one or both apps are failing to do so. There isn't anything KWin can do here, I'm afraid; it's up to both apps to implement this correctly.

In general KDE apps do this right when using KDE frameworks code, but fail when using native Qt URL-opening code in Qt5. However this is fixed in Qt 6.