mirror of
https://github.com/fltk/fltk.git
synced 2026-05-29 04:26:27 +08:00
Update bundled libdecor to last upstream version (May 14, 2025)
This commit is contained in:
@@ -23,14 +23,14 @@ The nanosvg library is not affected.
|
|||||||
|
|
||||||
\section bundled-status Current status
|
\section bundled-status Current status
|
||||||
\code
|
\code
|
||||||
Current versions of bundled libraries (as of April 4, 2025):
|
Current versions of bundled libraries (as of May 21, 2025):
|
||||||
Library Version/git commit Release date FLTK Version
|
Library Version/git commit Release date FLTK Version
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
jpeg jpeg-9f 2024-01-14 1.4.0
|
jpeg jpeg-9f 2024-01-14 1.4.0
|
||||||
nanosvg 7aeda550a8 [1] 2023-12-02 1.4.0
|
nanosvg 7aeda550a8 [1] 2023-12-02 1.4.0
|
||||||
png libpng-1.6.44 2024-09-12 1.4.1
|
png libpng-1.6.44 2024-09-12 1.4.1
|
||||||
zlib zlib-1.3.1 2024-01-22 1.4.0
|
zlib zlib-1.3.1 2024-01-22 1.4.0
|
||||||
libdecor 5974b6d4 [2] 2025-04-03 1.5.0
|
libdecor 42f7a53a [2] 2025-05-14 1.5.0
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
Previous versions of bundled libraries (FLTK 1.3.x):
|
Previous versions of bundled libraries (FLTK 1.3.x):
|
||||||
|
|||||||
@@ -17,11 +17,6 @@
|
|||||||
/* Improvements to libdecor.c without modifying libdecor.c itself */
|
/* Improvements to libdecor.c without modifying libdecor.c itself */
|
||||||
#if ! USE_SYSTEM_LIBDECOR
|
#if ! USE_SYSTEM_LIBDECOR
|
||||||
|
|
||||||
#include "xdg-shell-client-protocol.h"
|
|
||||||
#ifdef XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION
|
|
||||||
# define HAVE_XDG_SHELL_V6 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
static void *dlopen_corrected(const char *, int);
|
static void *dlopen_corrected(const char *, int);
|
||||||
|
|||||||
+42
-10
@@ -42,12 +42,6 @@
|
|||||||
#include "xdg-shell-client-protocol.h"
|
#include "xdg-shell-client-protocol.h"
|
||||||
#include "xdg-decoration-client-protocol.h"
|
#include "xdg-decoration-client-protocol.h"
|
||||||
|
|
||||||
#ifdef HAVE_XDG_SHELL_V6
|
|
||||||
#define XDG_WM_BASE_VER 6
|
|
||||||
#else
|
|
||||||
#define XDG_WM_BASE_VER 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct libdecor {
|
struct libdecor {
|
||||||
int ref_count;
|
int ref_count;
|
||||||
|
|
||||||
@@ -403,10 +397,24 @@ parse_states(struct wl_array *states)
|
|||||||
case XDG_TOPLEVEL_STATE_RESIZING:
|
case XDG_TOPLEVEL_STATE_RESIZING:
|
||||||
pending_state |= LIBDECOR_WINDOW_STATE_RESIZING;
|
pending_state |= LIBDECOR_WINDOW_STATE_RESIZING;
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_XDG_SHELL_V6
|
#ifdef XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION
|
||||||
case XDG_TOPLEVEL_STATE_SUSPENDED:
|
case XDG_TOPLEVEL_STATE_SUSPENDED:
|
||||||
pending_state |= LIBDECOR_WINDOW_STATE_SUSPENDED;
|
pending_state |= LIBDECOR_WINDOW_STATE_SUSPENDED;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef XDG_TOPLEVEL_STATE_CONSTRAINED_LEFT_SINCE_VERSION
|
||||||
|
case XDG_TOPLEVEL_STATE_CONSTRAINED_LEFT:
|
||||||
|
pending_state |= LIBDECOR_WINDOW_STATE_CONSTRAINED_LEFT;
|
||||||
|
break;
|
||||||
|
case XDG_TOPLEVEL_STATE_CONSTRAINED_RIGHT:
|
||||||
|
pending_state |= LIBDECOR_WINDOW_STATE_CONSTRAINED_RIGHT;
|
||||||
|
break;
|
||||||
|
case XDG_TOPLEVEL_STATE_CONSTRAINED_TOP:
|
||||||
|
pending_state |= LIBDECOR_WINDOW_STATE_CONSTRAINED_TOP;
|
||||||
|
break;
|
||||||
|
case XDG_TOPLEVEL_STATE_CONSTRAINED_BOTTOM:
|
||||||
|
pending_state |= LIBDECOR_WINDOW_STATE_CONSTRAINED_BOTTOM;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -449,7 +457,7 @@ xdg_toplevel_close(void *user_data,
|
|||||||
frame_priv->iface->close(frame, frame_priv->user_data);
|
frame_priv->iface->close(frame, frame_priv->user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_XDG_SHELL_V6
|
#ifdef XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION
|
||||||
static void
|
static void
|
||||||
xdg_toplevel_configure_bounds(void *user_data,
|
xdg_toplevel_configure_bounds(void *user_data,
|
||||||
struct xdg_toplevel *xdg_toplevel,
|
struct xdg_toplevel *xdg_toplevel,
|
||||||
@@ -474,7 +482,9 @@ xdg_toplevel_configure_bounds(void *user_data,
|
|||||||
frame_priv->iface->bounds(frame, width, height, frame_priv->user_data);
|
frame_priv->iface->bounds(frame, width, height, frame_priv->user_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION
|
||||||
static void
|
static void
|
||||||
xdg_toplevel_wm_capabilities(void *user_data,
|
xdg_toplevel_wm_capabilities(void *user_data,
|
||||||
struct xdg_toplevel *xdg_toplevel,
|
struct xdg_toplevel *xdg_toplevel,
|
||||||
@@ -510,8 +520,10 @@ xdg_toplevel_wm_capabilities(void *user_data,
|
|||||||
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
|
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
|
||||||
xdg_toplevel_configure,
|
xdg_toplevel_configure,
|
||||||
xdg_toplevel_close,
|
xdg_toplevel_close,
|
||||||
#ifdef HAVE_XDG_SHELL_V6
|
#ifdef XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION
|
||||||
xdg_toplevel_configure_bounds,
|
xdg_toplevel_configure_bounds,
|
||||||
|
#endif
|
||||||
|
#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION
|
||||||
xdg_toplevel_wm_capabilities,
|
xdg_toplevel_wm_capabilities,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@@ -725,6 +737,10 @@ libdecor_frame_set_visibility(struct libdecor_frame *frame,
|
|||||||
: ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE);
|
: ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (frame_priv->content_width <= 0 ||
|
||||||
|
frame_priv->content_height <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
/* enable/disable decorations that are managed by a plugin */
|
/* enable/disable decorations that are managed by a plugin */
|
||||||
if (frame_has_visible_client_side_decoration(frame)) {
|
if (frame_has_visible_client_side_decoration(frame)) {
|
||||||
/* show client-side decorations */
|
/* show client-side decorations */
|
||||||
@@ -1357,10 +1373,26 @@ init_xdg_wm_base(struct libdecor *context,
|
|||||||
uint32_t id,
|
uint32_t id,
|
||||||
uint32_t version)
|
uint32_t version)
|
||||||
{
|
{
|
||||||
|
uint32_t desired_version = 2;
|
||||||
|
|
||||||
|
/* Find the required version for the available features. */
|
||||||
|
#ifdef XDG_TOPLEVEL_STATE_CONSTRAINED_LEFT_SINCE_VERSION
|
||||||
|
desired_version = MAX(desired_version, XDG_TOPLEVEL_STATE_CONSTRAINED_LEFT_SINCE_VERSION);
|
||||||
|
#endif
|
||||||
|
#ifdef XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION
|
||||||
|
desired_version = MAX(desired_version, XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION);
|
||||||
|
#endif
|
||||||
|
#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION
|
||||||
|
desired_version = MAX(desired_version, XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION);
|
||||||
|
#endif
|
||||||
|
#ifdef XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION
|
||||||
|
desired_version = MAX(desired_version, XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION);
|
||||||
|
#endif
|
||||||
|
|
||||||
context->xdg_wm_base = wl_registry_bind(context->wl_registry,
|
context->xdg_wm_base = wl_registry_bind(context->wl_registry,
|
||||||
id,
|
id,
|
||||||
&xdg_wm_base_interface,
|
&xdg_wm_base_interface,
|
||||||
MIN(version,XDG_WM_BASE_VER));
|
MIN(version, desired_version));
|
||||||
xdg_wm_base_add_listener(context->xdg_wm_base,
|
xdg_wm_base_add_listener(context->xdg_wm_base,
|
||||||
&xdg_wm_base_listener,
|
&xdg_wm_base_listener,
|
||||||
context);
|
context);
|
||||||
|
|||||||
@@ -83,6 +83,10 @@ enum libdecor_window_state {
|
|||||||
LIBDECOR_WINDOW_STATE_TILED_BOTTOM = 1 << 6,
|
LIBDECOR_WINDOW_STATE_TILED_BOTTOM = 1 << 6,
|
||||||
LIBDECOR_WINDOW_STATE_SUSPENDED = 1 << 7,
|
LIBDECOR_WINDOW_STATE_SUSPENDED = 1 << 7,
|
||||||
LIBDECOR_WINDOW_STATE_RESIZING = 1 << 8,
|
LIBDECOR_WINDOW_STATE_RESIZING = 1 << 8,
|
||||||
|
LIBDECOR_WINDOW_STATE_CONSTRAINED_LEFT = 1 << 9,
|
||||||
|
LIBDECOR_WINDOW_STATE_CONSTRAINED_RIGHT = 1 << 10,
|
||||||
|
LIBDECOR_WINDOW_STATE_CONSTRAINED_TOP = 1 << 11,
|
||||||
|
LIBDECOR_WINDOW_STATE_CONSTRAINED_BOTTOM = 1 << 12,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum libdecor_resize_edge {
|
enum libdecor_resize_edge {
|
||||||
|
|||||||
@@ -3010,6 +3010,7 @@ libdecor_plugin_description = {
|
|||||||
.constructor = libdecor_plugin_new,
|
.constructor = libdecor_plugin_new,
|
||||||
.conflicting_symbols = {
|
.conflicting_symbols = {
|
||||||
"png_free",
|
"png_free",
|
||||||
|
"gdk_get_use_xshm",
|
||||||
NULL,
|
NULL,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user