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.
This commit is contained in:
Guido Günther 2021-08-25 12:21:48 +02:00 committed by Carlos Garnacho
parent c5da579cda
commit 1ab89b3908
2 changed files with 5 additions and 0 deletions

View File

@ -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;

View File

@ -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)
{