Add facilities for clients to request toplevel activation
This is a meta issue for discussing toplevel activation/focus requests. I realized we don't have one yet.
Use-cases
Let me know if your use-case doesn't fit in these categories.
An external event happens
Examples:
- An email/IM client receives a new message
- A terminal has finished executing a long-running command
- A software management app notifies about new updates
In all of these cases, the compositor might want to:
- Directly raise the toplevel
- Mark the toplevel (e.g. change its item in the task bar to red)
- If a desktop notification is opened, raise the toplevel when the notification is activated by the user.
On X11, a client can decide to raise its window or to set an urgency hint.
Transferring activation from one client to another
- User clicks/presses a button in client A
- In response to this event, client A wants to activate another client (client B)
Example:
- User clicks on an HTTP link in an e-mail client
- Web browser opens the link and gets activated
On X11, client B can raise itself directly.
Startup notifications
The compositor might want to display a spinner while a client is starting up.
This was typically done via the startup notification protocol on X11.
Previous proposals
- [RFC wayland-protocols] unstable: add protocol to give focus to a foreign surface, David Edmundson: https://lists.freedesktop.org/archives/wayland-devel/2018-July/038832.html
- [RFC wayland-protocols] presentation: New protocol for presenting surfaces to the user, Carlos Garnacho:
- [wayland-protocols] Add urgency hint to xdg-shell, Simon Ser: !9 (closed)
- [xdg-specs] notification: add wayland-surface hint, Simon Ser: xdg/xdg-specs!25 (closed)
- [wayland-protocols] xdg-shell: allow a toplevel to request its activation, Aleix Pol: !48 (closed)
- [wayland-protocols] Include a new xdg_activation protocol, Aleix Pol: !50 (merged)
Edited by Simon Ser