diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-12-02 16:59:21 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-12-02 16:59:52 +0100 |
| commit | 0aa8e28be0af167929e72267c6e1d5588bc9c3ed (patch) | |
| tree | 6b06c7cc2a0dcd3117adc579745b8bf52c343f9b /libdecor/src/plugins/cairo | |
| parent | d8dac2a0889cee0d5c81696e2f06b434119b7351 (diff) | |
Update libdecor to commit 060fe761 dated 1-dec-2023
Diffstat (limited to 'libdecor/src/plugins/cairo')
| -rw-r--r-- | libdecor/src/plugins/cairo/libdecor-cairo.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libdecor/src/plugins/cairo/libdecor-cairo.c b/libdecor/src/plugins/cairo/libdecor-cairo.c index 5951e93b5..f8beb7aa1 100644 --- a/libdecor/src/plugins/cairo/libdecor-cairo.c +++ b/libdecor/src/plugins/cairo/libdecor-cairo.c @@ -296,6 +296,9 @@ synthesize_pointer_leave(struct seat *seat); static bool own_proxy(struct wl_proxy *proxy) { + if (!proxy) + return false; + return (wl_proxy_get_tag(proxy) == &libdecor_cairo_proxy_tag); } @@ -387,7 +390,11 @@ libdecor_plugin_cairo_destroy(struct libdecor_plugin *plugin) wl_list_for_each_safe(output, output_tmp, &plugin_cairo->output_list, link) { - wl_output_destroy(output->wl_output); + if (wl_output_get_version (output->wl_output) >= + WL_OUTPUT_RELEASE_SINCE_VERSION) + wl_output_release(output->wl_output); + else + wl_output_destroy(output->wl_output); free(output); } @@ -2570,7 +2577,8 @@ init_wl_output(struct libdecor_plugin_cairo *plugin_cairo, output->id = id; output->wl_output = wl_registry_bind(plugin_cairo->wl_registry, - id, &wl_output_interface, 2); + id, &wl_output_interface, + MIN (version, 3)); wl_proxy_set_tag((struct wl_proxy *) output->wl_output, &libdecor_cairo_proxy_tag); wl_output_add_listener(output->wl_output, &output_listener, output); |
