From d452a729cb7b81a91086ca2cacb054b19923f4c5 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 25 Aug 2022 00:51:32 +0200 Subject: [PATCH] wlr-output-management: fix broken asserts These asserts were broken in 4c1afb12 as new implementations were added without updating the wl_resource_instance_of() calls. --- types/wlr_output_management_v1.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/wlr_output_management_v1.c b/types/wlr_output_management_v1.c index f7ac5dcf..3fb9cf43 100644 --- a/types/wlr_output_management_v1.c +++ b/types/wlr_output_management_v1.c @@ -18,20 +18,23 @@ enum { static const uint32_t HEAD_STATE_ALL = HEAD_STATE_ENABLED | HEAD_STATE_MODE | HEAD_STATE_POSITION | HEAD_STATE_TRANSFORM | HEAD_STATE_SCALE; +static const struct zwlr_output_head_v1_interface head_impl; // Can return NULL if the head is inert static struct wlr_output_head_v1 *head_from_resource( struct wl_resource *resource) { assert(wl_resource_instance_of(resource, - &zwlr_output_head_v1_interface, NULL)); + &zwlr_output_head_v1_interface, &head_impl)); return wl_resource_get_user_data(resource); } +static const struct zwlr_output_mode_v1_interface output_mode_impl; + // Can return NULL if the mode is inert static struct wlr_output_mode *mode_from_resource( struct wl_resource *resource) { assert(wl_resource_instance_of(resource, - &zwlr_output_mode_v1_interface, NULL)); + &zwlr_output_mode_v1_interface, &output_mode_impl)); return wl_resource_get_user_data(resource); }