Bug 455758 - Activated windows are not raised to front in Wayland session
Summary: Activated windows are not raised to front in Wayland session
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.25.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-21 21:49 UTC by Jonathan S
Modified: 2022-06-22 11:11 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan S 2022-06-21 21:49:33 UTC
SUMMARY
I have an issue where windows aren't raised to the foreground when they become active by an action in another window.  For example, clicking a link in an email opens the link in Firefox, but the Firefox window remains in the background. Another example is if I have the Plasma System Settings application open in the background then go into the Plasma Application Launcher and click on an item like "Display Configuration', it opens that configuration item in the System Settings window but it stays in the background behind any other open windows. I've tried all options of the "Focus stealing prevention" as suggested in the forum posts I've found online about this kind of issue, but nothing seems to change. 

STEPS TO REPRODUCE
1. Log in to a Plasma Wayland desktop session from SDDM
2. Open the System Settings application
3. Open another application (e.g. Konsole) and leave in front of System Settings window
4. From the Application Launcher widget, select a System settings configuration section (eg. "Colors")
5. The System Settings application changes view to that configuration section (eg. the "Colors" settings screen), but the System Settings window stays in the background behind the Konsole window.

OBSERVED RESULT
The activated window isn't raised to the front or given focus. It stays behind the other windows that are open in front of it.

EXPECTED RESULT
The activated window is raised to the front and given focus.

SOFTWARE/OS VERSIONS
Windows: n/a
macOS: n/a
Linux/KDE Plasma: KDE Neon  
(available in About System)
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
Another example scenario is when a hyperlink is clicked in an email, the URL opens in Firefox but the window stays behind all the other windows and not brought to front/focus.

I have confirmed that this behaviour is also observed in Kubuntu 22.04 (Plasma 5.24.4), Debian 11 (Plasma 5.20.5) & Fedora 36 (I think Plasma 5.24.4).

The "EXPECTED RESULT" above is how it works for me on an X11 session.

Graphics Processor: Intel HD Graphics 620
Comment 1 Zamundaaa 2022-06-22 08:54:59 UTC
Firefox unfortunately still does not support xdg activation: https://bugzilla.mozilla.org/show_bug.cgi?id=1767546

For the general case, both the application that's currently focused and the application that should receive focus need to support it. Plasmashell and system settings both work in git master, so that should already be fixed
Comment 2 Jonathan S 2022-06-22 11:11:26 UTC
Thanks for the explanation, Zamundaaa.

Is that likely to have been fixed more recently than the 5.25.0 version that I'm running? I'm definitely still seeing it from Application Launcher -> System Settings and have also just tested between KMail and Falkon browser. 

(In reply to Zamundaaa from comment #1)
> Firefox unfortunately still does not support xdg activation:
> https://bugzilla.mozilla.org/show_bug.cgi?id=1767546
> 
> For the general case, both the application that's currently focused and the
> application that should receive focus need to support it. Plasmashell and
> system settings both work in git master, so that should already be fixed