[gtk/wip/carlosg/backports-4-6: 2/9] wayland: Keep startup_notification_id around long enough
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/backports-4-6: 2/9] wayland: Keep startup_notification_id around long enough
- Date: Wed, 16 Mar 2022 18:52:55 +0000 (UTC)
commit 1ab89b3908c44432cca799dbbaf9c5f03e95b571
Author: Guido Günther <agx sigxcpu org>
Date: Wed Aug 25 12:21:48 2021 +0200
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.
gdk/wayland/gdkdisplay-wayland.c | 4 ++++
gdk/wayland/gdksurface-wayland.c | 1 +
2 files changed, 5 insertions(+)
---
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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]