diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-02-04 16:55:01 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-02-04 16:55:01 +0100 |
| commit | 0da00995a8052119228e7a84e2a34440142504fb (patch) | |
| tree | 0dd6d965f1d19a45c1dd5dd5389d38d9f83a5070 /src | |
| parent | 865aed4eec521d21af6c5b9b62f356fe62915ce5 (diff) | |
Shorten parameter list of Fl_Wayland_Window_Driver::delete_cursor_(bool)
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H index bde5b8559..8d50fe3cf 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H @@ -59,7 +59,7 @@ private: cairo_rectangle_int_t *subRect_; // makes sure subwindow remains inside its parent window static bool in_flush_; // useful for progressive window drawing Fl_Cursor standard_cursor_; // window's standard custom kind - void delete_cursor_(struct wld_window *, bool delete_rgb = true); + void delete_cursor_(bool delete_rgb = true); struct gl_start_support *gl_start_support_; // for support of gl_start/gl_finish bool is_popup_window_; public: diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 1df53b346..dacfdde1d 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -72,7 +72,8 @@ Fl_Wayland_Window_Driver::Fl_Wayland_Window_Driver(Fl_Window *win) : Fl_Window_D } -void Fl_Wayland_Window_Driver::delete_cursor_(struct wld_window *xid, bool delete_rgb) { +void Fl_Wayland_Window_Driver::delete_cursor_(bool delete_rgb) { + struct wld_window *xid = (struct wld_window *)Fl_Window_Driver::xid(pWindow); struct wld_window::custom_cursor_ *custom = xid->custom_cursor; if (custom) { struct wl_cursor *wl_cursor = custom->wl_cursor; @@ -488,7 +489,7 @@ void Fl_Wayland_Window_Driver::hide() { destroy_surface_caution_pointer_focus(wld_win->wl_surface, scr_driver->seat); wld_win->wl_surface = NULL; } - if (wld_win->custom_cursor) delete_cursor_(wld_win); + if (wld_win->custom_cursor) delete_cursor_(); while (!wl_list_empty(&wld_win->outputs)) { // remove from screens where it belongs struct surface_output *s_output; s_output = wl_container_of(wld_win->outputs.next, s_output, link); @@ -1674,7 +1675,7 @@ int Fl_Wayland_Window_Driver::set_cursor(Fl_Cursor c) { default: return 0; } - if (xid->custom_cursor) delete_cursor_(xid); + if (xid->custom_cursor) delete_cursor_(); standard_cursor_ = c; scr_driver->set_cursor(); return 1; @@ -1794,7 +1795,7 @@ int Fl_Wayland_Window_Driver::set_cursor_4args(const Fl_RGB_Image *rgb, int hotx memcpy(offscreen->data, offscreen->draw_buffer.buffer, offscreen->draw_buffer.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_(keep_copy); //have this new cursor used xid->custom_cursor = new wld_window::custom_cursor_; xid->custom_cursor->wl_cursor = new_cursor; |
