mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-25 05:15:41 +02:00
module/river: use wl_output_release() instead of wl_output_destroy()
This commit is contained in:
parent
0963afd282
commit
7e7c011126
1 changed files with 9 additions and 3 deletions
|
@ -191,7 +191,7 @@ output_destroy(struct output *output)
|
||||||
if (output->xdg_output != NULL)
|
if (output->xdg_output != NULL)
|
||||||
zxdg_output_v1_destroy(output->xdg_output);
|
zxdg_output_v1_destroy(output->xdg_output);
|
||||||
if (output->wl_output != NULL)
|
if (output->wl_output != NULL)
|
||||||
wl_output_destroy(output->wl_output);
|
wl_output_release(output->wl_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -495,7 +495,7 @@ handle_global(void *data, struct wl_registry *registry,
|
||||||
struct private *m = data;
|
struct private *m = data;
|
||||||
|
|
||||||
if (strcmp(interface, wl_output_interface.name) == 0) {
|
if (strcmp(interface, wl_output_interface.name) == 0) {
|
||||||
const uint32_t required = 1;
|
const uint32_t required = 3;
|
||||||
if (!verify_iface_version(interface, version, required))
|
if (!verify_iface_version(interface, version, required))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -505,8 +505,14 @@ handle_global(void *data, struct wl_registry *registry,
|
||||||
if (wl_output == NULL)
|
if (wl_output == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
struct output output = {
|
||||||
|
.m = m,
|
||||||
|
.wl_output = wl_output,
|
||||||
|
.wl_name = name,
|
||||||
|
};
|
||||||
|
|
||||||
mtx_lock(&m->mod->lock);
|
mtx_lock(&m->mod->lock);
|
||||||
tll_push_back(m->outputs, ((struct output){.m = m, .wl_output = wl_output, .wl_name = name}));
|
tll_push_back(m->outputs, output);
|
||||||
instantiate_output(&tll_back(m->outputs));
|
instantiate_output(&tll_back(m->outputs));
|
||||||
mtx_unlock(&m->mod->lock);
|
mtx_unlock(&m->mod->lock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue