~leon_plickat/wlopm

27b7ccd1f1f2f5f2986508890805934c3e7614ee — Leon Henrik Plickat 1 year, 7 months ago eb251de
Bind correct wl_output version
1 files changed, 9 insertions(+), 1 deletions(-)

M wlopm.c
M wlopm.c => wlopm.c +9 -1
@@ 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;