summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-03-16 10:41:54 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-03-16 10:41:54 +0100
commita9fb6a979fbcf31c2405d61ea720879bd5507d02 (patch)
tree94e168052f00c55f749033fc640988a027d36217 /src/drivers
parent09b7b4719d2d3211e14203606d824e768611ff73 (diff)
Rename bool variable for better clarity
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.H2
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx6
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;