From a3c604d5cc730676b06df644c9d5cc4759db18f7 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 1 Mar 2023 17:14:01 +0100 Subject: [PATCH] gtkwindow: Fix fallbacks through xdg_activation_v1 When activating a window, avoid the "old" gdk_notify_startup_complete*() API that does not fallback into xdg_activation on wayland (as this is still deferred here until show vs present happens on the surface). This was mistakenly changed wrt the original commit backported from GTK4. Fixes: a067938589d ("gtkwindow: Minor refactor") --- gtk/gtkwindow.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index e1b09a3658..39b01eeb66 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -6287,19 +6287,23 @@ gtk_window_notify_startup (GtkWindow *window) !GTK_IS_OFFSCREEN_WINDOW (window) && priv->type != GTK_WINDOW_POPUP) { + GdkWindow *gdk_window; + + gdk_window = _gtk_widget_get_window (GTK_WIDGET (window)); + /* Do we have a custom startup-notification id? */ if (priv->startup_id != NULL) { /* Make sure we have a "real" id */ if (!startup_id_is_fake (priv->startup_id)) - gdk_notify_startup_complete_with_id (priv->startup_id); + gdk_window_set_startup_id (gdk_window, priv->startup_id); g_free (priv->startup_id); priv->startup_id = NULL; } else { - gdk_notify_startup_complete (); + gdk_window_set_startup_id (gdk_window, NULL); } } }