From 8aafe6cf69f2da1d479b41bafdf23f9c482badd2 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 13 Mar 2023 15:31:12 +0100 Subject: Fix Fl_Wayland_Window_Driver::set_cursor_4args() --- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 6c1f301cf..fa6b8e4a4 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1509,8 +1509,8 @@ int Fl_Wayland_Window_Driver::set_cursor_4args(const Fl_RGB_Image *rgb, int hotx Fl_Surface_Device::pop_current(); delete img_surf; memcpy(offscreen->data, offscreen->draw_buffer, offscreen->data_size); - // delete the previous custom cursor, if there was one, but keep its Fl_RGB_Image - delete_cursor_(xid, true); + // delete the previous custom cursor, if there was one, and keep its Fl_RGB_Image if appropriate + delete_cursor_(xid, !keep_copy); //have this new cursor used xid->custom_cursor = new struct wld_window::custom_cursor; xid->custom_cursor->wl_cursor = new_cursor; -- cgit v1.2.3