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

@ -72,6 +72,7 @@ struct wlr_xwayland {
struct {
struct wl_signal ready;
struct wl_signal new_surface;
struct wl_signal remove_startup_info;
} events;
/**
@ -232,6 +233,11 @@ struct wlr_xwayland_move_event {
struct wlr_xwayland_surface *surface;
};
struct wlr_xwayland_remove_startup_info_event {
const char *id;
xcb_window_t window;
};
struct wlr_xwayland_resize_event {
struct wlr_xwayland_surface *surface;
uint32_t edges;