diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-07-25 16:32:57 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-07-25 16:32:57 +0000 |
| commit | a213e14ca35e73a1f353ae97f2e398d145e19f69 (patch) | |
| tree | fb1624e20a7380b18621259d3c9d5913083176ac /wayland.c | |
| parent | input: allow mouse selections to start inside the margins (diff) | |
| parent | osc+notify: strcmp() -> streq() (diff) | |
Merge branch 'kitty-notifications'
Diffstat (limited to 'wayland.c')
| -rw-r--r-- | wayland.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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); +} |
