diff --git a/src/wayland/meta-wayland-client-private.h b/src/wayland/meta-wayland-client-private.h index 0f67a2e66..c1524dead 100644 --- a/src/wayland/meta-wayland-client-private.h +++ b/src/wayland/meta-wayland-client-private.h @@ -20,6 +20,8 @@ #ifndef META_WAYLAND_CLIENT_PRIVATE_H #define META_WAYLAND_CLIENT_PRIVATE_H +#include + #include "core/util-private.h" #include "meta/meta-wayland-client.h" @@ -31,4 +33,8 @@ META_EXPORT_TEST int meta_wayland_client_setup_fd (MetaWaylandClient *client, GError **error); +META_EXPORT_TEST +gboolean meta_wayland_client_matches (MetaWaylandClient *client, + const struct wl_client *wayland_client); + #endif /* META_WAYLAND_CLIENT_PRIVATE_H */ diff --git a/src/wayland/meta-wayland-client.c b/src/wayland/meta-wayland-client.c index 56d8f4bcc..f7e1ff20c 100644 --- a/src/wayland/meta-wayland-client.c +++ b/src/wayland/meta-wayland-client.c @@ -473,3 +473,13 @@ meta_wayland_client_show_in_window_list (MetaWaylandClient *client, meta_window_recalc_features (window); } } + +gboolean +meta_wayland_client_matches (MetaWaylandClient *client, + const struct wl_client *wayland_client) +{ + g_return_val_if_fail (wayland_client, FALSE); + g_return_val_if_fail (client->wayland_client, FALSE); + + return client->wayland_client == wayland_client; +}