diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-05-14 17:28:17 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-05-14 23:49:44 -0400 |
commit | e5f1e4545d22a75518c7be54e20ecdda19273c4e (patch) | |
tree | b4eb13809403fbfb33002ff508ade17f2ffc8f9f /gdk | |
parent | bf87a40b203d6ed6c902aeb169bbcf081c65ff60 (diff) | |
download | gtk+-e5f1e4545d22a75518c7be54e20ecdda19273c4e.tar.gz |
gdk: Change the private export handle api
Make unexport_handle take the handle, so we
can in the future deal with multiple exports.
Update the one caller in gtkwindow.c to pass
the handle.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdktoplevel.c | 9 | ||||
-rw-r--r-- | gdk/gdktoplevelprivate.h | 6 | ||||
-rw-r--r-- | gdk/wayland/gdktoplevel-wayland.c | 11 | ||||
-rw-r--r-- | gdk/x11/gdksurface-x11.c | 3 |
4 files changed, 16 insertions, 13 deletions
diff --git a/gdk/gdktoplevel.c b/gdk/gdktoplevel.c index 5b201d45e4..6a1667768a 100644 --- a/gdk/gdktoplevel.c +++ b/gdk/gdktoplevel.c @@ -135,7 +135,8 @@ gdk_toplevel_default_export_handle_finish (GdkToplevel *toplevel, } static void -gdk_toplevel_default_unexport_handle (GdkToplevel *toplevel) +gdk_toplevel_default_unexport_handle (GdkToplevel *toplevel, + const char *handle) { } @@ -810,6 +811,7 @@ gdk_toplevel_export_handle_finish (GdkToplevel *toplevel, /*< private > * gdk_toplevel_unexport_handle: * @toplevel: a `GdkToplevel` + * @handle: the handle to unexport * * Destroys the handle that was obtained with [method@Gdk.Toplevel.export_handle]. * @@ -819,7 +821,8 @@ gdk_toplevel_export_handle_finish (GdkToplevel *toplevel, * Since: 4.10 */ void -gdk_toplevel_unexport_handle (GdkToplevel *toplevel) +gdk_toplevel_unexport_handle (GdkToplevel *toplevel, + const char *handle) { - GDK_TOPLEVEL_GET_IFACE (toplevel)->unexport_handle (toplevel); + GDK_TOPLEVEL_GET_IFACE (toplevel)->unexport_handle (toplevel, handle); } diff --git a/gdk/gdktoplevelprivate.h b/gdk/gdktoplevelprivate.h index 8f0f8d6f8e..6fb6d40835 100644 --- a/gdk/gdktoplevelprivate.h +++ b/gdk/gdktoplevelprivate.h @@ -49,7 +49,8 @@ struct _GdkToplevelInterface GAsyncResult *result, GError **error); - void (* unexport_handle) (GdkToplevel *toplevel); + void (* unexport_handle) (GdkToplevel *toplevel, + const char *handle); }; typedef enum @@ -82,7 +83,8 @@ char *gdk_toplevel_export_handle_finish (GdkToplevel *toplevel, GAsyncResult *result, GError **error); -void gdk_toplevel_unexport_handle (GdkToplevel *toplevel); +void gdk_toplevel_unexport_handle (GdkToplevel *toplevel, + const char *handle); G_END_DECLS diff --git a/gdk/wayland/gdktoplevel-wayland.c b/gdk/wayland/gdktoplevel-wayland.c index 521841ee9d..7b968e5c16 100644 --- a/gdk/wayland/gdktoplevel-wayland.c +++ b/gdk/wayland/gdktoplevel-wayland.c @@ -1809,7 +1809,8 @@ gdk_wayland_toplevel_real_export_handle_finish (GdkToplevel *toplevel, } static void -gdk_wayland_toplevel_real_unexport_handle (GdkToplevel *toplevel) +gdk_wayland_toplevel_real_unexport_handle (GdkToplevel *toplevel, + const char *handle) { GdkWaylandToplevel *wayland_toplevel = GDK_WAYLAND_TOPLEVEL (toplevel); @@ -2486,9 +2487,7 @@ gdk_wayland_toplevel_export_handle (GdkToplevel *toplevel, void gdk_wayland_toplevel_unexport_handle (GdkToplevel *toplevel) { - g_return_if_fail (GDK_IS_WAYLAND_TOPLEVEL (toplevel)); - - gdk_toplevel_unexport_handle (toplevel); + g_warning ("Use gdk_wayland_toplevel_drop_exported_handle()"); } /** @@ -2507,9 +2506,7 @@ void gdk_wayland_toplevel_drop_exported_handle (GdkToplevel *toplevel, const char *handle) { - g_return_if_fail (GDK_IS_WAYLAND_TOPLEVEL (toplevel)); - - gdk_toplevel_unexport_handle (toplevel); + gdk_toplevel_unexport_handle (toplevel, handle); } static void diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index db8a8770ed..468ee941b6 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -5318,7 +5318,8 @@ gdk_x11_toplevel_export_handle_finish (GdkToplevel *toplevel, } static void -gdk_x11_toplevel_unexport_handle (GdkToplevel *toplevel) +gdk_x11_toplevel_unexport_handle (GdkToplevel *toplevel, + const char *handle) { } |