libdecor: update with upstream source code as of 2023-may-26

This commit is contained in:
ManoloFLTK 2023-06-07 15:53:19 +02:00
parent 033ad1d732
commit 87dec3af9c
3 changed files with 30 additions and 24 deletions

View File

@ -23,14 +23,14 @@ The nanosvg library is not affected.
\section bundled-status Current status
\code
Current versions of bundled libraries (as of May 2, 2023):
Current versions of bundled libraries (as of June 7, 2023):
Library Version/git commit Release date FLTK Version
--------------------------------------------------------------------------
jpeg jpeg-9e 2022-01-16 1.4.0
nanosvg abcd277ea4 [1] 2022-12-22 1.4.0
png libpng-1.6.39 2022-11-20 1.4.0
zlib zlib-1.2.13 2022-10-13 1.4.0
libdecor db4e5084 [2] 2023-05-01 1.4.0
libdecor 6ca6dac9 [2] 2023-05-26 1.4.0
--------------------------------------------------------------------------
Previous versions of bundled libraries (FLTK 1.3.x):

View File

@ -398,12 +398,15 @@ libdecor_plugin_cairo_destroy(struct libdecor_plugin *plugin)
free(plugin_cairo->cursor_theme_name);
wl_shm_destroy(plugin_cairo->wl_shm);
if (plugin_cairo->wl_shm)
wl_shm_destroy(plugin_cairo->wl_shm);
pango_font_description_free(plugin_cairo->font);
wl_compositor_destroy(plugin_cairo->wl_compositor);
wl_subcompositor_destroy(plugin_cairo->wl_subcompositor);
if (plugin_cairo->wl_compositor)
wl_compositor_destroy(plugin_cairo->wl_compositor);
if (plugin_cairo->wl_subcompositor)
wl_subcompositor_destroy(plugin_cairo->wl_subcompositor);
libdecor_plugin_release(&plugin_cairo->plugin);
free(plugin_cairo);
@ -2679,13 +2682,6 @@ globals_callback(void *user_data,
wl_callback_destroy(callback);
plugin_cairo->globals_callback = NULL;
if (!has_required_globals(plugin_cairo)) {
libdecor_notify_plugin_error(
plugin_cairo->context,
LIBDECOR_ERROR_COMPOSITOR_INCOMPATIBLE,
"Compositor is missing required globals");
}
}
static const struct wl_callback_listener globals_callback_listener = {
@ -2731,6 +2727,13 @@ libdecor_plugin_new(struct libdecor *context)
wl_callback_add_listener(plugin_cairo->globals_callback,
&globals_callback_listener,
plugin_cairo);
wl_display_roundtrip(wl_display);
if (!has_required_globals(plugin_cairo)) {
fprintf(stderr, "libdecor-cairo-WARNING: Could not get required globals\n");
libdecor_plugin_cairo_destroy(&plugin_cairo->plugin);
return NULL;
}
return &plugin_cairo->plugin;
}

View File

@ -33,6 +33,7 @@
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <wayland-client-core.h>
#include <wayland-cursor.h>
#include "libdecor-plugin.h"
@ -427,10 +428,13 @@ libdecor_plugin_gtk_destroy(struct libdecor_plugin *plugin)
free(plugin_gtk->cursor_theme_name);
wl_shm_destroy(plugin_gtk->wl_shm);
if (plugin_gtk->wl_shm)
wl_shm_destroy(plugin_gtk->wl_shm);
wl_compositor_destroy(plugin_gtk->wl_compositor);
wl_subcompositor_destroy(plugin_gtk->wl_subcompositor);
if (plugin_gtk->wl_compositor)
wl_compositor_destroy(plugin_gtk->wl_compositor);
if (plugin_gtk->wl_subcompositor)
wl_subcompositor_destroy(plugin_gtk->wl_subcompositor);
free(plugin_gtk);
@ -2100,6 +2104,7 @@ pointer_leave(void *data,
if (frame_gtk) {
frame_gtk->active = NULL;
frame_gtk->hdr_focus.widget = NULL;
frame_gtk->hdr_focus.type = HEADER_NONE;
draw_decoration(frame_gtk);
libdecor_frame_toplevel_commit(&frame_gtk->frame);
update_local_cursor(seat);
@ -2532,15 +2537,6 @@ globals_callback(void *user_data,
wl_callback_destroy(callback);
plugin_gtk->globals_callback = NULL;
if (!has_required_globals(plugin_gtk)) {
struct libdecor *context = plugin_gtk->context;
libdecor_notify_plugin_error(
context,
LIBDECOR_ERROR_COMPOSITOR_INCOMPATIBLE,
"Compositor is missing required globals");
}
}
static const struct wl_callback_listener globals_callback_listener = {
@ -2580,6 +2576,13 @@ libdecor_plugin_new(struct libdecor *context)
wl_callback_add_listener(plugin_gtk->globals_callback,
&globals_callback_listener,
plugin_gtk);
wl_display_roundtrip(wl_display);
if (!has_required_globals(plugin_gtk)) {
fprintf(stderr, "libdecor-gtk-WARNING: Could not get required globals\n");
libdecor_plugin_gtk_destroy(&plugin_gtk->plugin);
return NULL;
}
/* setup GTK context */
gdk_set_allowed_backends("wayland");