From 99d5bf64bca5daa70e3e8c5a4d63a257ba7e6fb8 Mon Sep 17 00:00:00 2001 From: Ronan Pigott Date: Thu, 28 Oct 2021 17:51:44 -0700 Subject: foot/client: implement xdga client activation This is an application of the xdg activation protocol that will allow compositors to associate new foot toplevels with the command that launched them. footclient receives an activation token from the launcher which the compositor can use to track application startup. It passes the token to the foot server, which then activates the new window with the token to complete the startup sequence. --- wayland.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'wayland.c') diff --git a/wayland.c b/wayland.c index 49c8ed92..22e3d6dc 100644 --- a/wayland.c +++ b/wayland.c @@ -1374,7 +1374,7 @@ wayl_destroy(struct wayland *wayl) } struct wl_window * -wayl_win_init(struct terminal *term) +wayl_win_init(struct terminal *term, const char *token) { struct wayland *wayl = term->wl; const struct config *conf = term->conf; @@ -1444,6 +1444,10 @@ wayl_win_init(struct terminal *term) wl_surface_commit(win->surface); + /* Complete XDG startup notification */ + if (token) + xdg_activation_v1_activate(wayl->xdg_activation, token, win->surface); + if (conf->tweak.render_timer_osd) { if (!wayl_win_subsurface_new(win, &win->render_timer)) { LOG_ERR("failed to create render timer surface"); -- cgit v1.3