diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index 34b0f014c1..bebe26f38c 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -1149,7 +1149,7 @@ _gdk_display_get_next_serial (GdkDisplay *display) * [method@Gtk.Window.set_auto_startup_notification] * is called to disable that feature. * - * Deprecated: 4.10. Using gdk_toplevel_set_startup_id() is sufficient. + * Deprecated: 4.10: Using [method@Gdk.Toplevel.set_startup_id] is sufficient */ void gdk_display_notify_startup_complete (GdkDisplay *display, @@ -1168,6 +1168,8 @@ gdk_display_notify_startup_complete (GdkDisplay *display, * if no ID has been defined. * * Returns: (nullable): the startup notification ID for @display + * + * Deprecated: 4.10 */ const char * gdk_display_get_startup_notification_id (GdkDisplay *display) diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h index 3ab938ae11..b6bfa2c6cf 100644 --- a/gdk/gdkdisplay.h +++ b/gdk/gdkdisplay.h @@ -86,7 +86,7 @@ GdkClipboard * gdk_display_get_primary_clipboard (GdkDisplay GDK_DEPRECATED_IN_4_10_FOR(gdk_toplevel_set_startup_id) void gdk_display_notify_startup_complete (GdkDisplay *display, const char *startup_id); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_10 const char * gdk_display_get_startup_notification_id (GdkDisplay *display); GDK_AVAILABLE_IN_ALL diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index e9e1b766d6..0e30ff23b5 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -2074,8 +2074,10 @@ gdk_x11_display_make_default (GdkDisplay *display) display_x11->startup_notification_id = NULL; startup_id = gdk_get_startup_notification_id (); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (startup_id) gdk_x11_display_set_startup_notification_id (display, startup_id); +G_GNUC_END_IGNORE_DEPRECATIONS } static void @@ -2303,6 +2305,8 @@ gdk_x11_display_get_user_time (GdkDisplay *display) * Gets the startup notification ID for a display. * * Returns: the startup notification ID for @display + * + * Deprecated: 4.10 */ const char * gdk_x11_display_get_startup_notification_id (GdkDisplay *display) @@ -2329,7 +2333,9 @@ gdk_x11_display_get_startup_notification_id (GdkDisplay *display) * The startup ID is also what is used to signal that the startup is * complete (for example, when opening a window or when calling * gdk_display_notify_startup_complete()). - **/ + * + * Deprecated: 4.10: Using [method@Gdk.Toplevel.set_startup_id] is sufficient + */ void gdk_x11_display_set_startup_notification_id (GdkDisplay *display, const char *startup_id) @@ -3042,7 +3048,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class) display_class->get_app_launch_context = _gdk_x11_display_get_app_launch_context; display_class->get_next_serial = gdk_x11_display_get_next_serial; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS display_class->get_startup_notification_id = gdk_x11_display_get_startup_notification_id; +G_GNUC_END_IGNORE_DEPRECATIONS display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete; display_class->create_surface = _gdk_x11_display_create_surface; display_class->get_keymap = gdk_x11_display_get_keymap; diff --git a/gdk/x11/gdkx11display.h b/gdk/x11/gdkx11display.h index 8633eadddb..46b7627db5 100644 --- a/gdk/x11/gdkx11display.h +++ b/gdk/x11/gdkx11display.h @@ -80,9 +80,9 @@ Cursor gdk_x11_display_get_xcursor (GdkDisplay *display, GDK_AVAILABLE_IN_ALL guint32 gdk_x11_display_get_user_time (GdkDisplay *display); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_10 const char * gdk_x11_display_get_startup_notification_id (GdkDisplay *display); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_10 void gdk_x11_display_set_startup_notification_id (GdkDisplay *display, const char *startup_id); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkapplication-x11.c b/gtk/gtkapplication-x11.c index f834c78e04..60a0613cb1 100644 --- a/gtk/gtkapplication-x11.c +++ b/gtk/gtkapplication-x11.c @@ -87,7 +87,9 @@ gtk_application_impl_x11_before_emit (GtkApplicationImpl *impl, g_variant_lookup (platform_data, "desktop-startup-id", "&s", &startup_notification_id); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_x11_display_set_startup_notification_id (gdk_display_get_default (), startup_notification_id); +G_GNUC_END_IGNORE_DEPRECATIONS } static void diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index d8dfd5c2d1..97a09ff0ca 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -321,7 +321,9 @@ gtk_application_add_platform_data (GApplication *application, { const char *startup_id; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS startup_id = gdk_display_get_startup_notification_id (display); +G_GNUC_END_IGNORE_DEPRECATIONS if (startup_id && g_utf8_validate (startup_id, -1, NULL)) { g_variant_builder_add (builder, "{sv}", "activation-token",