summaryrefslogtreecommitdiff
path: root/src/drivers/Wayland
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-04-23 16:15:05 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-04-23 16:15:05 +0200
commit285e8e843afa51e3e1ae2ffdd3b4161b566b160d (patch)
tree9a6ea2c713ad2d972db2500769621eca6d8d3fe5 /src/drivers/Wayland
parent8e21120f75a0d791ce6f1cc26445f1978ed8875d (diff)
Create Fl_Cairo_Graphics_Driver::handle_dummy_cairo(cairo_t *cr).
Diffstat (limited to 'src/drivers/Wayland')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx9
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx1
2 files changed, 2 insertions, 8 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
index 79044c522..18de912ce 100644
--- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
@@ -143,14 +143,7 @@ Fl_Wayland_Graphics_Driver::Fl_Wayland_Graphics_Driver () : Fl_Cairo_Graphics_Dr
void Fl_Wayland_Graphics_Driver::activate(struct fl_wld_buffer *buffer, float scale) {
- if (dummy_pango_layout_) {
- cairo_surface_t *surf = cairo_get_target(cairo_);
- cairo_destroy(cairo_);
- cairo_surface_destroy(surf);
- g_object_unref(dummy_pango_layout_);
- dummy_pango_layout_ = NULL;
- pango_layout_ = NULL;
- }
+ if (dummy_cairo_) handle_dummy_cairo(buffer->cairo_);
cairo_ = buffer->cairo_;
if (pango_layout_ != buffer->pango_layout_) {
if (pango_layout_) g_object_unref(pango_layout_);
diff --git a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
index a5d97fdcd..d02e7272e 100644
--- a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
@@ -47,6 +47,7 @@ Fl_Wayland_Image_Surface_Driver::Fl_Wayland_Image_Surface_Driver(int w, int h, i
Fl_Wayland_Image_Surface_Driver::~Fl_Wayland_Image_Surface_Driver() {
if (offscreen && !external_offscreen) {
+ cairo_destroy(offscreen->cairo_);
free(offscreen->draw_buffer);
free(offscreen);
}