Deprecate gdk_wayland_toplevel_unexport_handle
authorMatthias Clasen <mclasen@redhat.com>
Sun, 14 May 2023 21:34:35 +0000 (17:34 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 15 May 2023 04:20:24 +0000 (00:20 -0400)
It doesn't do anything anymore, and is no longer
used internally. The replacement is
gdk_wayland_toplevel_drop_exported_handled().

gdk/wayland/gdktoplevel-wayland.c
gdk/wayland/gdkwaylandtoplevel.h

index bd3738ff3d5b0d065a708340bfaaf97327130932..efeb857b21930b0a20aefa99819c63f603fa6e43 100644 (file)
@@ -2502,6 +2502,12 @@ export_handle_done (GObject      *source,
  * from another surface as transient for this one, see
  * [method@GdkWayland.WaylandToplevel.set_transient_for_exported].
  *
+ * Before 4.12, this API could not safely be used multiple times,
+ * since there was no reference counting for handles. Starting with
+ * 4.12, every call to this function obtains a new handle, and every
+ * call to [method@GdkWayland.WaylandToplevel.drop_exported_handle] drops
+ * just the handle that it is given.
+ *
  * Note that this API depends on an unstable Wayland protocol,
  * and thus may require changes in the future.
  *
@@ -2538,8 +2544,15 @@ gdk_wayland_toplevel_export_handle (GdkToplevel                *toplevel,
  * It is an error to call this function on a surface that
  * does not have a handle.
  *
+ * Since 4.12, this function does nothing. Use
+ * [method@GdkWayland.WaylandToplevel.drop_exported_handle] instead to drop a
+ * handle that was obtained with [method@GdkWayland.WaylandToplevel.export_handle].
+ *
  * Note that this API depends on an unstable Wayland protocol,
  * and thus may require changes in the future.
+ *
+ * Deprecated: 4.12: Use [method@GdkWayland.WaylandToplevel.drop_exported_handle]
+ *   instead, this function does nothing
  */
 void
 gdk_wayland_toplevel_unexport_handle (GdkToplevel *toplevel)
index bb7abe597620485ea1e23722f8db5b24c3f8ce8e..0240f9d19fa78eef3c383e6a4f7578532f177a54 100644 (file)
@@ -52,7 +52,7 @@ gboolean                 gdk_wayland_toplevel_export_handle (GdkToplevel
                                                              gpointer                 user_data,
                                                              GDestroyNotify           destroy_func);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_12_FOR(gdk_wayland_toplevel_drop_exported_handle)
 void                     gdk_wayland_toplevel_unexport_handle (GdkToplevel *toplevel);
 
 GDK_AVAILABLE_IN_4_12