mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-15 22:05:24 -05:00
wayland: check activation supported before activating
It's possible for token to be set when the compositor doesn't support activation, and this caused a segfault. For example, this can happen when overriding WAYLAND_DISPLAY to point to a compositor that doesn't support activation, in a terminal running under one that does, and so has set XDG_ACTIVATION_TOKEN.
This commit is contained in:
parent
a4843ef418
commit
9257273d84
1 changed files with 1 additions and 1 deletions
|
|
@ -1701,7 +1701,7 @@ wayl_win_init(struct terminal *term, const char *token)
|
|||
wl_surface_commit(win->surface.surf);
|
||||
|
||||
/* Complete XDG startup notification */
|
||||
if (token)
|
||||
if (token && wayl->xdg_activation)
|
||||
xdg_activation_v1_activate(wayl->xdg_activation, token, win->surface.surf);
|
||||
|
||||
if (!wayl_win_subsurface_new(win, &win->overlay, false)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue