diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-07-22 14:23:08 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-07-22 14:23:08 +0200 |
| commit | fa0aa95443689fc0d5fae2abdf16b2920faf55fa (patch) | |
| tree | 0e046ce68a75e1d4305fc1089b97eacb31209446 | |
| parent | cdd617d09421ea5c2b15a0b6005572a220409211 (diff) | |
libdecor: update with upstream source code as of 2023-JUL-15
| -rw-r--r-- | documentation/src/bundled-libs.dox | 2 | ||||
| -rw-r--r-- | libdecor/build/fl_libdecor.c | 7 | ||||
| -rw-r--r-- | libdecor/src/libdecor.c | 35 | ||||
| -rw-r--r-- | libdecor/src/libdecor.h | 1 |
4 files changed, 38 insertions, 7 deletions
diff --git a/documentation/src/bundled-libs.dox b/documentation/src/bundled-libs.dox index 3af1dd756..a49fc8697 100644 --- a/documentation/src/bundled-libs.dox +++ b/documentation/src/bundled-libs.dox @@ -30,7 +30,7 @@ Current versions of bundled libraries (as of June 13, 2023): 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 73260393 [2] 2023-06-06 1.4.0 + libdecor f43652c7 [2] 2023-07-15 1.4.0 -------------------------------------------------------------------------- Previous versions of bundled libraries (FLTK 1.3.x): diff --git a/libdecor/build/fl_libdecor.c b/libdecor/build/fl_libdecor.c index a4d3e812b..6716bf746 100644 --- a/libdecor/build/fl_libdecor.c +++ b/libdecor/build/fl_libdecor.c @@ -16,6 +16,13 @@ /* Improvements to libdecor.c without modifying libdecor.c itself */ +// this part to support libdecor commit f43652c7 dated 15-jul-2023 +#include "xdg-shell-client-protocol.h" +#ifndef XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION +# define XDG_TOPLEVEL_STATE_SUSPENDED (enum xdg_toplevel_state)9 +#endif +// end of this part + #define libdecor_frame_set_minimized libdecor_frame_set_minimized_orig #define libdecor_new libdecor_new_orig #include <dlfcn.h> diff --git a/libdecor/src/libdecor.c b/libdecor/src/libdecor.c index a9c11062d..b08488939 100644 --- a/libdecor/src/libdecor.c +++ b/libdecor/src/libdecor.c @@ -390,6 +390,9 @@ parse_states(struct wl_array *states) case XDG_TOPLEVEL_STATE_TILED_BOTTOM: pending_state |= LIBDECOR_WINDOW_STATE_TILED_BOTTOM; break; + case XDG_TOPLEVEL_STATE_SUSPENDED: + pending_state |= LIBDECOR_WINDOW_STATE_SUSPENDED; + break; default: break; } @@ -431,9 +434,26 @@ xdg_toplevel_close(void *user_data, frame_priv->iface->close(frame, frame_priv->user_data); } +static void +xdg_toplevel_configure_bounds(void *data, + struct xdg_toplevel *xdg_toplevel, + int32_t width, + int32_t height) +{ +} + +static void +xdg_toplevel_wm_capabilities(void *data, + struct xdg_toplevel *xdg_toplevel, + struct wl_array *capabilities) +{ +} + static const struct xdg_toplevel_listener xdg_toplevel_listener = { xdg_toplevel_configure, xdg_toplevel_close, + xdg_toplevel_configure_bounds, + xdg_toplevel_wm_capabilities, }; static void @@ -1238,7 +1258,7 @@ init_xdg_wm_base(struct libdecor *context, context->xdg_wm_base = wl_registry_bind(context->wl_registry, id, &xdg_wm_base_interface, - MIN(version,2)); + MIN(version,6)); xdg_wm_base_add_listener(context->xdg_wm_base, &xdg_wm_base_listener, context); @@ -1389,18 +1409,21 @@ calculate_priority(const struct libdecor_plugin_description *plugin_description) } static bool -check_symbol_conflicts(const struct libdecor_plugin_description *plugin_description) +check_symbol_conflicts(const struct libdecor_plugin_description *plugin_description, void *lib) { char * const *symbol; symbol = plugin_description->conflicting_symbols; while (*symbol) { dlerror(); - dlsym (RTLD_DEFAULT, *symbol); + void *sym = dlsym(RTLD_DEFAULT, *symbol); if (!dlerror()) { - fprintf(stderr, "Plugin \"%s\" uses conflicting symbol \"%s\".\n", + void *libsym = dlsym(lib, *symbol); + if (!dlerror() && libsym != sym) { + fprintf(stderr, "Plugin \"%s\" uses conflicting symbol \"%s\".\n", plugin_description->description, *symbol); - return false; + return false; + } } symbol++; @@ -1460,7 +1483,7 @@ load_plugin_loader(struct libdecor *context, return NULL; } - if (!check_symbol_conflicts(plugin_description)) { + if (!check_symbol_conflicts(plugin_description, lib)) { dlclose(lib); return NULL; } diff --git a/libdecor/src/libdecor.h b/libdecor/src/libdecor.h index 078169771..af67e2fd5 100644 --- a/libdecor/src/libdecor.h +++ b/libdecor/src/libdecor.h @@ -81,6 +81,7 @@ enum libdecor_window_state { LIBDECOR_WINDOW_STATE_TILED_RIGHT = 1 << 4, LIBDECOR_WINDOW_STATE_TILED_TOP = 1 << 5, LIBDECOR_WINDOW_STATE_TILED_BOTTOM = 1 << 6, + LIBDECOR_WINDOW_STATE_SUSPENDED = 1 << 7, }; enum libdecor_resize_edge { |
