From 4bf9172a8e4f76842a2e011671cf5c057e8fe1d1 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sun, 23 Apr 2023 10:03:02 +0200 Subject: Replace internal fl_create_offscreen() calls by new Fl_Image_Surface --- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/drivers/Wayland') diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 4f57c1ae5..d4b02679a 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -176,19 +176,19 @@ void Fl_Wayland_Window_Driver::flush_overlay() pWindow->clear_damage((uchar)(pWindow->damage()&~FL_DAMAGE_OVERLAY)); pWindow->make_current(); if (!other_xid) { - other_xid = fl_create_offscreen(oWindow->w(), oWindow->h()); + other_xid = new Fl_Image_Surface(oWindow->w(), oWindow->h(), 1); oWindow->clear_damage(FL_DAMAGE_ALL); } if (oWindow->damage() & ~FL_DAMAGE_EXPOSE) { Fl_X *myi = Fl_X::flx(pWindow); fl_clip_region(myi->region); myi->region = 0; - fl_begin_offscreen(other_xid); + Fl_Surface_Device::push_current(other_xid); draw(); - fl_end_offscreen(); + Fl_Surface_Device::pop_current(); } if (erase_overlay) fl_clip_region(0); if (other_xid) { - fl_copy_offscreen(0, 0, oWindow->w(), oWindow->h(), other_xid, 0, 0); + fl_copy_offscreen(0, 0, oWindow->w(), oWindow->h(), other_xid->offscreen(), 0, 0); } if (overlay() == oWindow) oWindow->draw_overlay(); } -- cgit v1.2.3