summaryrefslogtreecommitdiff
path: root/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-08-09 10:31:36 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-08-09 10:31:36 +0200
commit1943fe54c8fdf759a3f4da88ea8a8fb5f6f5f7cb (patch)
tree698368755555882244b7eaab9fcbb931e7959fda /src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
parent06e8cf98a6a08c202333bff893be55741961bfd3 (diff)
Wayland: fix fl_read_image() from offscreen buffer
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
index 3fa9c7094..f35ae8543 100644
--- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
@@ -70,7 +70,6 @@ struct fl_wld_buffer *Fl_Wayland_Graphics_Driver::create_shm_buffer(int width, i
wl_shm_pool_set_user_data(pool, pool_data);
}
buffer = (struct fl_wld_buffer*)calloc(1, sizeof(struct fl_wld_buffer));
- buffer->draw_buffer.stride = stride;
buffer->wl_buffer = wl_shm_pool_create_buffer(pool, chunk_offset, width, height, stride, Fl_Wayland_Graphics_Driver::wld_format);
// add this buffer to head of list of current pool's buffers
wl_list_insert(&pool_data->buffers, &buffer->link);
@@ -152,6 +151,7 @@ void Fl_Wayland_Graphics_Driver::buffer_commit(struct wld_window *window,
void Fl_Wayland_Graphics_Driver::cairo_init(struct fl_wld_draw_buffer *buffer, int width, int height, int stride, cairo_format_t format) {
buffer->data_size = stride * height;
+ buffer->stride = stride;
buffer->buffer = new uchar[buffer->data_size];
buffer->width = width;
cairo_surface_t *surf = cairo_image_surface_create_for_data(buffer->buffer, format,