Update libdecor to upstream commit 4f2c03d5 - cont'd

This commit is contained in:
ManoloFLTK
2024-03-13 15:23:43 +01:00
parent 56f49828f4
commit 5400811b83
3 changed files with 6 additions and 6 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 March 12, 2024):
Current versions of bundled libraries (as of March 13, 2024):
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.42 2024-01-29 1.4.0
zlib zlib-1.3.1 2024-01-22 1.4.0
libdecor 09875530 [2] 2024-03-03 1.4.0
libdecor 4f2c03d5 [2] 2024-03-04 1.4.0
--------------------------------------------------------------------------
Previous versions of bundled libraries (FLTK 1.3.x):

View File

@@ -694,7 +694,7 @@ FLTK creates a \c wl_buffer object each time an Fl_Window is mapped on a display
That's done by member function \c Fl_Wayland_Graphics_Driver::create_shm_buffer()
which follows this 3-step procedure to create a "buffer factory" for FLTK and to construct
Wayland buffers from it:
- Libdecor function <tt>os_create_anonymous_file(off_t size)</tt> creates an adequate file
- Libdecor function <tt>libdecor_os_create_anonymous_file(off_t size)</tt> creates an adequate file
and mmap's it. This file lives in RAM because it is created by function \c memfd_create().
FLTK sets this file size to 10 MB unless the size of the buffer to be created
is larger; in that case the anonymous file is sized to twice the buffer size.

View File

@@ -25,7 +25,7 @@
extern "C" {
# include "../../../libdecor/src/os-compatibility.h" // for os_create_anonymous_file()
# include "../../../libdecor/src/os-compatibility.h" // for libdecor_os_create_anonymous_file()
}
// used by create_shm_buffer and do_buffer_release
@@ -76,9 +76,9 @@ void Fl_Wayland_Graphics_Driver::create_shm_buffer(Fl_Wayland_Graphics_Driver::w
pool_size = default_pool_size;
if (buffer->draw_buffer.data_size > pool_size)
pool_size = 2 * buffer->draw_buffer.data_size; // a larger pool is needed
int fd = os_create_anonymous_file(pool_size);
int fd = libdecor_os_create_anonymous_file(pool_size);
if (fd < 0) {
Fl::fatal("os_create_anonymous_file failed: %s\n", strerror(errno));
Fl::fatal("libdecor_os_create_anonymous_file failed: %s\n", strerror(errno));
}
pool_data = (struct wld_shm_pool_data*)calloc(1, sizeof(struct wld_shm_pool_data));
pool_data->pool_memory = (char*)mmap(NULL, pool_size, PROT_READ | PROT_WRITE,