mirror of
https://git.sr.ht/~leon_plickat/wlopm
synced 2024-11-16 02:18:25 +01:00
Bind correct wl_output version
This commit is contained in:
parent
eb251dec93
commit
27b7ccd1f1
10
wlopm.c
10
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;
|
||||
|
Loading…
Reference in New Issue
Block a user