Update to libdecor ca6e6b68 dated 25-aug-2023

This commit is contained in:
ManoloFLTK
2023-08-25 13:59:07 +02:00
parent 85ec2642c0
commit afc60b2503
3 changed files with 23 additions and 8 deletions
+2 -2
View File
@@ -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 August 23, 2023): Current versions of bundled libraries (as of August 25, 2023):
Library Version/git commit Release date FLTK Version Library Version/git commit Release date FLTK Version
-------------------------------------------------------------------------- --------------------------------------------------------------------------
jpeg jpeg-9e 2022-01-16 1.4.0 jpeg jpeg-9e 2022-01-16 1.4.0
nanosvg abcd277ea4 [1] 2022-12-22 1.4.0 nanosvg abcd277ea4 [1] 2022-12-22 1.4.0
png libpng-1.6.40 2023-06-21 1.4.0 png libpng-1.6.40 2023-06-21 1.4.0
zlib zlib-1.3 2023-08-18 1.4.0 zlib zlib-1.3 2023-08-18 1.4.0
libdecor f43652c7 [2] 2023-07-15 1.4.0 libdecor ca6e6b68 [2] 2023-08-25 1.4.0
-------------------------------------------------------------------------- --------------------------------------------------------------------------
Previous versions of bundled libraries (FLTK 1.3.x): Previous versions of bundled libraries (FLTK 1.3.x):
+3 -5
View File
@@ -1,7 +1,7 @@
// //
// Interface with the libdecor library for the Fast Light Tool Kit (FLTK). // Interface with the libdecor library for the Fast Light Tool Kit (FLTK).
// //
// Copyright 2022 by Bill Spitzak and others. // Copyright 2022-2023 by Bill Spitzak and others.
// //
// This library is free software. Distribution and use rights are outlined in // This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this // the file "COPYING" which should have been included with this file. If this
@@ -16,12 +16,10 @@
/* Improvements to libdecor.c without modifying libdecor.c itself */ /* 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" #include "xdg-shell-client-protocol.h"
#ifndef XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION #ifdef XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION
# define XDG_TOPLEVEL_STATE_SUSPENDED (enum xdg_toplevel_state)9 # define HAVE_XDG_SHELL_V6 1
#endif #endif
// end of this part
#define libdecor_frame_set_minimized libdecor_frame_set_minimized_orig #define libdecor_frame_set_minimized libdecor_frame_set_minimized_orig
#define libdecor_new libdecor_new_orig #define libdecor_new libdecor_new_orig
+18 -1
View File
@@ -42,6 +42,12 @@
#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;
@@ -390,9 +396,11 @@ parse_states(struct wl_array *states)
case XDG_TOPLEVEL_STATE_TILED_BOTTOM: case XDG_TOPLEVEL_STATE_TILED_BOTTOM:
pending_state |= LIBDECOR_WINDOW_STATE_TILED_BOTTOM; pending_state |= LIBDECOR_WINDOW_STATE_TILED_BOTTOM;
break; break;
#ifdef HAVE_XDG_SHELL_V6
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
default: default:
break; break;
} }
@@ -434,6 +442,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
static void static void
xdg_toplevel_configure_bounds(void *data, xdg_toplevel_configure_bounds(void *data,
struct xdg_toplevel *xdg_toplevel, struct xdg_toplevel *xdg_toplevel,
@@ -448,12 +457,15 @@ xdg_toplevel_wm_capabilities(void *data,
struct wl_array *capabilities) struct wl_array *capabilities)
{ {
} }
#endif
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
xdg_toplevel_configure_bounds, xdg_toplevel_configure_bounds,
xdg_toplevel_wm_capabilities, xdg_toplevel_wm_capabilities,
#endif
}; };
static void static void
@@ -593,6 +605,11 @@ libdecor_frame_unref(struct libdecor_frame *frame)
struct libdecor *context = frame_priv->context; struct libdecor *context = frame_priv->context;
struct libdecor_plugin *plugin = context->plugin; struct libdecor_plugin *plugin = context->plugin;
if (context->decoration_manager && frame_priv->toplevel_decoration) {
zxdg_toplevel_decoration_v1_destroy(frame_priv->toplevel_decoration);
frame_priv->toplevel_decoration = NULL;
}
wl_list_remove(&frame->link); wl_list_remove(&frame->link);
if (frame_priv->xdg_toplevel) if (frame_priv->xdg_toplevel)
@@ -1258,7 +1275,7 @@ init_xdg_wm_base(struct libdecor *context,
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,6)); MIN(version,XDG_WM_BASE_VER));
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);