mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 08:32:30 +00:00
security-context: constify lookup_client()
This is worth doing despite wl_client_get_destroy_listener() incorrectly accepting a mutable wl_client pointer since this lookup_client() function will primarily be used with a wl_display_global_filter_func_t which only provides a const wl_client pointer. Work around this libwayland API wart in wlroots so compositors don't have to.
This commit is contained in:
parent
c5eda09166
commit
5a5aa72571
@ -50,6 +50,6 @@ struct wlr_security_context_v1_commit_event {
|
|||||||
struct wlr_security_context_manager_v1 *wlr_security_context_manager_v1_create(
|
struct wlr_security_context_manager_v1 *wlr_security_context_manager_v1_create(
|
||||||
struct wl_display *display);
|
struct wl_display *display);
|
||||||
const struct wlr_security_context_v1_state *wlr_security_context_manager_v1_lookup_client(
|
const struct wlr_security_context_v1_state *wlr_security_context_manager_v1_lookup_client(
|
||||||
struct wlr_security_context_manager_v1 *manager, struct wl_client *client);
|
struct wlr_security_context_manager_v1 *manager, const struct wl_client *client);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -429,8 +429,8 @@ struct wlr_security_context_manager_v1 *wlr_security_context_manager_v1_create(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const struct wlr_security_context_v1_state *wlr_security_context_manager_v1_lookup_client(
|
const struct wlr_security_context_v1_state *wlr_security_context_manager_v1_lookup_client(
|
||||||
struct wlr_security_context_manager_v1 *manager, struct wl_client *client) {
|
struct wlr_security_context_manager_v1 *manager, const struct wl_client *client) {
|
||||||
struct wl_listener *listener = wl_client_get_destroy_listener(client,
|
struct wl_listener *listener = wl_client_get_destroy_listener((struct wl_client *)client,
|
||||||
security_context_client_handle_destroy);
|
security_context_client_handle_destroy);
|
||||||
if (listener == NULL) {
|
if (listener == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user