mirror of https://github.com/fltk/fltk
Rename bool variable for better clarity
This commit is contained in:
parent
09b7b4719d
commit
a9fb6a979f
|
@ -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_; };
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue