From a9fb6a979fbcf31c2405d61ea720879bd5507d02 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:41:54 +0100 Subject: [PATCH] Rename bool variable for better clarity --- src/drivers/Wayland/Fl_Wayland_Window_Driver.H | 2 +- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H index 1bf85a1c1..59df79f41 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H @@ -60,7 +60,7 @@ private: static bool in_flush; // useful for progressive window drawing static Fl_Wayland_Plugin *gl_plugin(); Fl_Cursor standard_cursor_; // window's standard custom kind - void delete_cursor_(struct wld_window *, bool keep_rgb = false); + void delete_cursor_(struct wld_window *, bool delete_rgb = true); struct gl_start_support *gl_start_support_; // for support of gl_start/gl_finish public: inline Fl_Cursor standard_cursor() { return standard_cursor_; }; diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index fa6b8e4a4..969deb485 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -78,7 +78,7 @@ Fl_Wayland_Window_Driver::Fl_Wayland_Window_Driver(Fl_Window *win) : Fl_Window_D subRect_ = NULL; } -void Fl_Wayland_Window_Driver::delete_cursor_(struct wld_window *xid, bool keep_rgb) { +void Fl_Wayland_Window_Driver::delete_cursor_(struct wld_window *xid, bool delete_rgb) { struct wld_window::custom_cursor *custom = xid->custom_cursor; if (custom) { struct wl_cursor *wl_cursor = custom->wl_cursor; @@ -93,7 +93,7 @@ void Fl_Wayland_Window_Driver::delete_cursor_(struct wld_window *xid, bool keep_ free(wl_cursor); Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver(); if (scr_driver->default_cursor() == wl_cursor) scr_driver->default_cursor(scr_driver->xc_arrow); - if (!keep_rgb) delete custom->rgb; + if (delete_rgb) delete custom->rgb; delete custom; xid->custom_cursor = NULL; } @@ -1510,7 +1510,7 @@ int Fl_Wayland_Window_Driver::set_cursor_4args(const Fl_RGB_Image *rgb, int hotx delete img_surf; memcpy(offscreen->data, offscreen->draw_buffer, offscreen->data_size); // delete the previous custom cursor, if there was one, and keep its Fl_RGB_Image if appropriate - delete_cursor_(xid, !keep_copy); + 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;