mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-24 05:45:57 +01: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
2 changed files with 3 additions and 3 deletions
|
@ -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 a new issue