From: Guido Günther Date: Wed, 25 Aug 2021 10:21:48 +0000 (+0200) Subject: wayland: Keep startup_notification_id around long enough X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~19^2~3^2~6^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1ab89b3908c44432cca799dbbaf9c5f03e95b571;p=gtk4.git wayland: Keep startup_notification_id around long enough When using xdg_activation we need to keep the id around until we send the first activate to signal succesful startup. --- diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index ea64041aa7..c8100ff4fa 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -854,6 +854,10 @@ gdk_wayland_display_notify_startup_complete (GdkDisplay *display, GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display); char *free_this = NULL; + /* Will be signaled with focus activation */ + if (display_wayland->xdg_activation) + return; + if (startup_id == NULL) { startup_id = free_this = display_wayland->startup_notification_id; diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index da2f110b14..25be2f0b7c 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -3474,6 +3474,7 @@ gdk_wayland_surface_focus (GdkSurface *surface, xdg_activation_v1_activate (display_wayland->xdg_activation, display_wayland->startup_notification_id, impl->display_server.wl_surface); + gdk_wayland_display_set_startup_notification_id (GDK_DISPLAY (display_wayland), NULL); } else if (display_wayland->gtk_shell_version >= 3) {