commit afeaf129349d09e21bbbf8c5c486865140aac9d3
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Sat Sep 13 11:46:22 2025 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Sat Sep 13 11:46:22 2025 +0200
Update bundled libdecor to last upstream version (August 15, 2025)
documentation/src/bundled-libs.dox | 4 ++--
libdecor/src/plugins/gtk/libdecor-gtk.c | 28 ++++++++++++++++++++--------
2 files changed, 22 insertions(+), 10 deletions(-)
diff --git documentation/src/bundled-libs.dox documentation/src/bundled-libs.dox
index aa2a62f..b9e4252 100644
--- documentation/src/bundled-libs.dox
+++ documentation/src/bundled-libs.dox
@@ -23,14 +23,14 @@ The nanosvg library is not affected.
\section bundled-status Current status
\code
-Current versions of bundled libraries (as of Sept 7, 2025):
+Current versions of bundled libraries (as of Sept 13, 2025):
Library Version/git commit Release date FLTK Version
--------------------------------------------------------------------------
jpeg jpeg-9f 2024-01-14 1.4.0
nanosvg 7aeda550a8 [1] 2023-12-02 1.4.0
png libpng-1.6.50 2025-07-01 1.5.0
zlib zlib-1.3.1 2024-01-22 1.4.0
- libdecor 42f7a53a [2] 2025-05-14 1.5.0
+ libdecor c4540b4a [2] 2025-08-15 1.5.0
--------------------------------------------------------------------------
Previous versions of bundled libraries (FLTK 1.3.x):
diff --git libdecor/src/plugins/gtk/libdecor-gtk.c libdecor/src/plugins/gtk/libdecor-gtk.c
index 3e79983..bc5b0fa 100644
--- libdecor/src/plugins/gtk/libdecor-gtk.c
+++ libdecor/src/plugins/gtk/libdecor-gtk.c
@@ -924,6 +924,11 @@ ensure_title_bar_surfaces(struct libdecor_frame_gtk *frame_gtk)
frame_gtk->headerbar.opaque = false;
ensure_component(frame_gtk, &frame_gtk->headerbar);
+ if (frame_gtk->shadow.wl_surface) {
+ wl_subsurface_place_above(frame_gtk->headerbar.wl_subsurface,
+ frame_gtk->shadow.wl_surface);
+ }
+
/* create an offscreen window with a header bar */
/* TODO: This should only be done once at frame consutrction, but then
* the window and headerbar would not change style (e.g. backdrop)
@@ -1761,6 +1766,8 @@ libdecor_plugin_gtk_frame_get_border_size(struct libdecor_plugin *plugin,
int *top,
int *bottom)
{
+ struct libdecor_frame_gtk *frame_gtk =
+ (struct libdecor_frame_gtk *) frame;
enum libdecor_window_state window_state;
if (configuration) {
@@ -1778,17 +1785,22 @@ libdecor_plugin_gtk_frame_get_border_size(struct libdecor_plugin *plugin,
if (bottom)
*bottom = 0;
if (top) {
- GtkWidget *header = ((struct libdecor_frame_gtk *)frame)->header;
enum decoration_type type = window_state_to_decoration_type(window_state);
- /* avoid warnings after decoration has been turned off */
- if (GTK_IS_WIDGET(header) && (type != DECORATION_TYPE_NONE)) {
- /* Redraw title bar to ensure size will be up-to-date */
- if (configuration && type == DECORATION_TYPE_TITLE_ONLY)
- draw_title_bar((struct libdecor_frame_gtk *) frame);
- *top = gtk_widget_get_allocated_height(header);
- } else {
+ switch (type) {
+ case DECORATION_TYPE_NONE:
*top = 0;
+ break;
+ case DECORATION_TYPE_ALL:
+ ensure_border_surfaces(frame_gtk);
+ //draw_border(frame_gtk);
+ G_GNUC_FALLTHROUGH;
+ case DECORATION_TYPE_TITLE_ONLY:
+ if (!frame_gtk->header)
+ ensure_title_bar_surfaces(frame_gtk);
+ gtk_widget_show_all(frame_gtk->window);
+ gtk_widget_get_preferred_height(frame_gtk->header, NULL, top);
+ break;
}
}
[ Direct Link to Message ]