xwayland: Allow to retrieve startup-id via _NET_STARTUP_INFO

A launchee notifies with a "remove"¹ message when done starting up.
Catch these and forward to the compositor. This allows the compositor to
end the startup sequence that might have been started by another
protocol like xdg-activation.

We don't handle other messages since we expect the launcher to use a
wayland protocol like xdg-activation.

While `_NET_STARTUP_ID` helps to associate toplevels with startup-ids
this signals the end of the startup sequence.

1) https://specifications.freedesktop.org/startup-notification-spec/startup-notification-latest.txt
This commit is contained in:
Guido Günther 2021-01-29 16:45:44 +01:00 committed by Simon Ser
parent 4e7a8707cc
commit e479dc1ef0
4 changed files with 96 additions and 0 deletions

View file

@ -56,6 +56,8 @@ enum atom_name {
TIMESTAMP,
DELETE,
NET_STARTUP_ID,
NET_STARTUP_INFO,
NET_STARTUP_INFO_BEGIN,
NET_WM_WINDOW_TYPE_NORMAL,
NET_WM_WINDOW_TYPE_UTILITY,
NET_WM_WINDOW_TYPE_TOOLTIP,
@ -113,6 +115,7 @@ struct wlr_xwm {
// Surfaces in bottom-to-top stacking order, for _NET_CLIENT_LIST_STACKING
struct wl_list surfaces_in_stack_order; // wlr_xwayland_surface::stack_link
struct wl_list unpaired_surfaces; // wlr_xwayland_surface::unpaired_link
struct wl_list pending_startup_ids; // pending_startup_id
struct wlr_drag *drag;
struct wlr_xwayland_surface *drag_focus;