From a5e8fbcca05aa938264779a18424210939844b20 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 24 Oct 2023 23:09:09 +0200 Subject: Fix "Wayland: Overlay windows look blurred" (#808) --- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index e844dbb90..da73319d8 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -194,7 +194,11 @@ void Fl_Wayland_Window_Driver::flush_overlay() } if (erase_overlay) fl_clip_region(0); if (other_xid) { - fl_copy_offscreen(0, 0, oWindow->w(), oWindow->h(), other_xid->offscreen(), 0, 0); + struct Fl_Wayland_Graphics_Driver::draw_buffer *buffer = + Fl_Wayland_Graphics_Driver::offscreen_buffer(other_xid->offscreen()); + struct wld_window *xid = fl_wl_xid(pWindow); + struct Fl_Wayland_Graphics_Driver::wld_buffer *wbuffer = xid->buffer; + memcpy(wbuffer->draw_buffer.buffer, buffer->buffer, wbuffer->draw_buffer.data_size); } if (overlay() == oWindow) oWindow->draw_overlay(); } -- cgit v1.2.3