gdk/wayland: Deprecate GdkDisplay windowing-specific for startup IDs

This is currently just used as a convenience storage of the startup ID
between the GtkApplication and the GtkWindow (after it's ready to notify
on it).

This could be untangled in the GTK layers so there is no involvement
from GDK in keeping the startup ID around, in the mean time just deprecate
these gdk_wayland* API calls.
This commit is contained in:
Carlos Garnacho 2023-02-02 12:10:56 +01:00
parent bb777507ce
commit 7ad74ad6c3
3 changed files with 10 additions and 2 deletions

View File

@ -832,6 +832,8 @@ gdk_wayland_display_get_next_serial (GdkDisplay *display)
* if no ID has been defined.
*
* Returns: (nullable): the startup notification ID for @display
*
* Deprecated: 4.10.
*/
const char *
gdk_wayland_display_get_startup_notification_id (GdkDisplay *display)
@ -853,6 +855,8 @@ gdk_wayland_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
* [method@Gdk.Display.notify_startup_complete]).
*
* Deprecated: 4.10. Use [method@Gdk.Toplevel.set_startup_id]
*/
void
gdk_wayland_display_set_startup_notification_id (GdkDisplay *display,
@ -981,7 +985,9 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class)
display_class->queue_events = _gdk_wayland_display_queue_events;
display_class->get_app_launch_context = _gdk_wayland_display_get_app_launch_context;
display_class->get_next_serial = gdk_wayland_display_get_next_serial;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
display_class->get_startup_notification_id = gdk_wayland_display_get_startup_notification_id;
G_GNUC_END_IGNORE_DEPRECATIONS
display_class->notify_startup_complete = gdk_wayland_display_notify_startup_complete;
display_class->create_surface = _gdk_wayland_display_create_surface;
display_class->get_keymap = _gdk_wayland_display_get_keymap;

View File

@ -53,9 +53,9 @@ GDK_AVAILABLE_IN_ALL
void gdk_wayland_display_set_cursor_theme (GdkDisplay *display,
const char *name,
int size);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_4_10
const char * gdk_wayland_display_get_startup_notification_id (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_4_10_FOR(gdk_toplevel_set_startup_id)
void gdk_wayland_display_set_startup_notification_id (GdkDisplay *display,
const char *startup_id);

View File

@ -108,7 +108,9 @@ gtk_application_impl_wayland_before_emit (GtkApplicationImpl *impl,
if (!startup_notification_id)
g_variant_lookup (platform_data, "desktop-startup-id", "&s", &startup_notification_id);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdk_wayland_display_set_startup_notification_id (gdk_display_get_default (), startup_notification_id);
G_GNUC_END_IGNORE_DEPRECATIONS
}
static guint