aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2022-08-25 00:51:32 +0200
committerIsaac Freund <mail@isaacfreund.com>2022-08-25 00:51:32 +0200
commitd452a729cb7b81a91086ca2cacb054b19923f4c5 (patch)
treec8f87e0ba6b6fd26b5bfcae65c3e1cd454078454
parent4c1afb126b9a49aee367276f634f8686428d6147 (diff)
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.
-rw-r--r--types/wlr_output_management_v1.c7
1 files 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);
}