From 27b7ccd1f1f2f5f2986508890805934c3e7614ee Mon Sep 17 00:00:00 2001 From: Leon Henrik Plickat Date: Mon, 31 Jan 2022 15:19:14 +0100 Subject: [PATCH] Bind correct wl_output version --- wlopm.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wlopm.c b/wlopm.c index d9a3fe1..880de9c 100644 --- a/wlopm.c +++ b/wlopm.c @@ -135,6 +135,14 @@ static void registry_handle_global (void *data, struct wl_registry *registry, { if ( strcmp(interface, wl_output_interface.name) == 0 ) { + if ( version < 4 ) + { + fputs("ERROR: The compositor uses an outdated wl_output version.\n" + " Please inform the compositor developers so they can update to the latest version.\n", stderr); + loop = false; + return; + } + struct Output *output = calloc(1, sizeof(struct Output)); if ( output == NULL ) { @@ -143,7 +151,7 @@ static void registry_handle_global (void *data, struct wl_registry *registry, } output->wl_output = wl_registry_bind(registry, name, - &wl_output_interface, version); + &wl_output_interface, 4); wl_output_add_listener(output->wl_output, &wl_output_listener, output); output->wlr_output_power = NULL; output->name = NULL;