diff --git a/src/meta/meta-wayland-client.h b/src/meta/meta-wayland-client.h index b32995bf9..c5f0c8376 100644 --- a/src/meta/meta-wayland-client.h +++ b/src/meta/meta-wayland-client.h @@ -60,5 +60,9 @@ META_EXPORT void meta_wayland_client_show_in_window_list (MetaWaylandClient *client, MetaWindow *window); +META_EXPORT +void meta_wayland_client_make_desktop (MetaWaylandClient *client, + MetaWindow *window); + G_END_DECLS diff --git a/src/wayland/meta-wayland-client.c b/src/wayland/meta-wayland-client.c index 8e8b9b0b3..351f13e75 100644 --- a/src/wayland/meta-wayland-client.c +++ b/src/wayland/meta-wayland-client.c @@ -474,6 +474,27 @@ meta_wayland_client_show_in_window_list (MetaWaylandClient *client, } } +/** + * meta_wayland_client_make_desktop + * @client: a #MetaWaylandClient + * @window: (not nullable): a MetaWindow + * + * Mark window as DESKTOP window + */ +void +meta_wayland_client_make_desktop (MetaWaylandClient *client, + MetaWindow *window) +{ + g_return_if_fail (META_IS_WAYLAND_CLIENT (client)); + g_return_if_fail (META_IS_WINDOW (window)); + g_return_if_fail (window->type == META_WINDOW_NORMAL); + + if (!meta_wayland_client_owns_window (client, window)) + return; + + meta_window_set_type (window, META_WINDOW_DESKTOP); +} + gboolean meta_wayland_client_matches (MetaWaylandClient *client, const struct wl_client *wayland_client)