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: a067938589
("gtkwindow: Minor refactor")
This commit is contained in:
parent
a1f0d64287
commit
a3c604d5cc
@ -6287,19 +6287,23 @@ gtk_window_notify_startup (GtkWindow *window)
|
|||||||
!GTK_IS_OFFSCREEN_WINDOW (window) &&
|
!GTK_IS_OFFSCREEN_WINDOW (window) &&
|
||||||
priv->type != GTK_WINDOW_POPUP)
|
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? */
|
/* Do we have a custom startup-notification id? */
|
||||||
if (priv->startup_id != NULL)
|
if (priv->startup_id != NULL)
|
||||||
{
|
{
|
||||||
/* Make sure we have a "real" id */
|
/* Make sure we have a "real" id */
|
||||||
if (!startup_id_is_fake (priv->startup_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);
|
g_free (priv->startup_id);
|
||||||
priv->startup_id = NULL;
|
priv->startup_id = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gdk_notify_startup_complete ();
|
gdk_window_set_startup_id (gdk_window, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user