mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-05-02 06:46:32 -04:00
wayland: add wayl_activate()
wayl_activate() takes an XDG activation token and does an XDG activation request.
This commit is contained in:
parent
a42f990818
commit
69f56b86b7
2 changed files with 15 additions and 2 deletions
15
wayland.c
15
wayland.c
|
|
@ -1824,8 +1824,7 @@ wayl_win_init(struct terminal *term, const char *token)
|
|||
wl_surface_commit(win->surface.surf);
|
||||
|
||||
/* Complete XDG startup notification */
|
||||
if (token && wayl->xdg_activation != NULL)
|
||||
xdg_activation_v1_activate(wayl->xdg_activation, token, win->surface.surf);
|
||||
wayl_activate(wayl, win, token);
|
||||
|
||||
if (!wayl_win_subsurface_new(win, &win->overlay, false)) {
|
||||
LOG_ERR("failed to create overlay surface");
|
||||
|
|
@ -2377,3 +2376,15 @@ wayl_get_activation_token(
|
|||
xdg_activation_token_v1_commit(token);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
wayl_activate(struct wayland *wayl, struct wl_window *win, const char *token)
|
||||
{
|
||||
if (wayl->xdg_activation == NULL)
|
||||
return;
|
||||
|
||||
if (token == NULL)
|
||||
return;
|
||||
|
||||
xdg_activation_v1_activate(wayl->xdg_activation, token, win->surface.surf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue