From d8eb1f9ca465ca685a67203df38616a13bd82bb4 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 13 Jun 2022 16:37:25 +0200 Subject: [PATCH] Minor simplification of Fl_Wayland_Graphics_Driver::cairo_init. --- src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx index a71c943ff..8ed03f47e 100644 --- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx @@ -71,7 +71,6 @@ struct fl_wld_buffer *Fl_Wayland_Graphics_Driver::create_shm_buffer(int width, i buffer->data_size = size; buffer->width = width; buffer->draw_buffer = new uchar[buffer->data_size]; - memset(buffer->draw_buffer, 0, buffer->data_size); // necessary for transparent windows buffer->draw_buffer_needs_commit = false; //fprintf(stderr, "create_shm_buffer: %dx%d = %d\n", width, height, size); cairo_init(buffer, width, height, stride, Fl_Cairo_Graphics_Driver::cairo_format); @@ -105,8 +104,7 @@ void Fl_Wayland_Graphics_Driver::cairo_init(struct fl_wld_buffer *buffer, int wi return; } cairo_surface_destroy(surf); - cairo_set_source_rgba(buffer->cairo_, 1.0, 1.0, 1.0, 0.); - cairo_paint(buffer->cairo_); + memset(buffer->draw_buffer, 0, buffer->data_size); // useful for transparent windows cairo_set_source_rgba(buffer->cairo_, .0, .0, .0, 1.0); // Black default color cairo_save(buffer->cairo_); }