wayland: Don't crash without xdg_activation_v1

If the compositor does not support this protocol,
we can't use it.

Fixes: #5701


(cherry picked from commit 3a5282abe1)
This commit is contained in:
Matthias Clasen
2023-03-26 10:11:14 -04:00
committed by Michael Catanzaro
parent 76c6a55206
commit 78bdfe9db9

View File

@@ -991,7 +991,7 @@ gdk_wayland_toplevel_set_startup_id (GdkWaylandToplevel *toplevel,
startup_id = free_me;
}
if (startup_id)
if (display->xdg_activation && startup_id)
xdg_activation_v1_activate (display->xdg_activation,
startup_id,
surface->display_server.wl_surface);