From 78bdfe9db9b463442ceeace130cf209080291d9c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 26 Mar 2023 10:11:14 -0400 Subject: [PATCH] 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 3a5282abe1aabebef7d276a01a36f7512cab4b9b) --- gdk/wayland/gdktoplevel-wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/wayland/gdktoplevel-wayland.c b/gdk/wayland/gdktoplevel-wayland.c index c198477612..af201ac8f0 100644 --- a/gdk/wayland/gdktoplevel-wayland.c +++ b/gdk/wayland/gdktoplevel-wayland.c @@ -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); -- 2.30.2