mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
wayland/client: Add API to check if it matches a wl_client
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2810>
This commit is contained in:
parent
71e0bc0cbf
commit
63c8c229d6
@ -20,6 +20,8 @@
|
||||
#ifndef META_WAYLAND_CLIENT_PRIVATE_H
|
||||
#define META_WAYLAND_CLIENT_PRIVATE_H
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
#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 */
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user