In the way towards deprecating gdk_display_notify_startup_complete(),
make gdk_toplevel_set_startup_id() on X11 perform this piece of messaging
itself. It should be harmless that the message is emitted twice, if
callers do still use that API.
const char *startup_id)
{
GdkDisplay *display;
+ char *free_this = NULL;
g_return_if_fail (GDK_IS_SURFACE (surface));
else
XDeleteProperty (GDK_DISPLAY_XDISPLAY (display), GDK_SURFACE_XID (surface),
gdk_x11_get_xatom_by_name_for_display (display, "_NET_STARTUP_ID"));
+
+ if (startup_id == NULL)
+ {
+ GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
+
+ startup_id = free_this = display_x11->startup_notification_id;
+ display_x11->startup_notification_id = NULL;
+
+ if (startup_id == NULL)
+ return;
+ }
+
+ gdk_x11_display_broadcast_startup_message (display, "remove",
+ "ID", startup_id,
+ NULL);
+
+ g_free (free_this);
}
static void