[kwin] Support for startup notifications
Open, Needs TriagePublic

Description

We need a way to have the launcher tell KWin that the user started an application and which application it started. KWin can use this information for startup feedback and to decide whether a window should gain focus or not.

The mechanism should also be able to support KDBusService applications.

sitter added a subscriber: sitter.

an idea how it could work technically: the startup notification id should still be passed to the application through env variable. We could - in the Qt case - use plasma-integration to pass the startup id to KWin, so that we have the link between window and startup id.

an idea how it could work technically: the startup notification id should still be passed to the application through env variable. We could - in the Qt case - use plasma-integration to pass the startup id to KWin, so that we have the link between window and startup id.

I noticed that some people started adding workarounds that look like:

connect(m_trayicon, &KStatusNotifierItem::activateRequested, [=] (bool active) { active ? m_trayicon->associatedWidget()->show() : m_trayicon->associatedWidget()->hide(); });

to make system tray restore application on Wayland. What is your opinion on this? Somehow adding this to every app with system tray seems bad. Would it not better for workaround to sit in KStatusNotifierItem and KSystemTrayIconm i.e. in frameworks and not per app.

davidedmundson updated the task description. (Show Details)

org.freedesktop.Application (KDBusService ) supports a variant map of "platform-hints" X startup ID is currently in there and then not used.

There's now a discussion thread on wayland-devel with a proposed protocol. Currently getting derailed with people trying to replace net_wm_needs_attention

Personally I don't like "tell KWin that the user started an application " then blindly matching desktop names or something. I'd rather have it passing focus from surface to surface ,