From dcb4c39956092b6a4b9d8e0e85c2065099804119 Mon Sep 17 00:00:00 2001
From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
Date: Thu, 23 Mar 2023 18:42:02 +0100
Subject: Wayland: remove compilation warning (#706)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
drivers/Wayland/Fl_Wayland_Window_Driver.cxx:1515:47: warning: declaration ‘struct wld_window::custom_cursor’ does not declare anything
---
documentation/src/wayland.dox | 6 +++---
src/drivers/Wayland/Fl_Wayland_Window_Driver.H | 2 +-
src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/documentation/src/wayland.dox b/documentation/src/wayland.dox
index 05ceafb14..c928c2dd3 100644
--- a/documentation/src/wayland.dox
+++ b/documentation/src/wayland.dox
@@ -588,9 +588,9 @@ struct wl_cursor {
\endcode
Function \c Fl_Wayland_Window_Driver::set_cursor_4args() also creates a struct wl_cursor
object containing a single \c wl_cursor_image, which is in fact the \c cursor_image.
-Finally, a struct custom_cursor (see \ref wld_window) is allocated and used to memorize
+Finally, a struct custom_cursor_ (see \ref wld_window) is allocated and used to memorize
the struct wl_cursor and the cursor's image and hotspot.
-A pointer to this struct custom_cursor object is stored in member \c custom_cursor of the
+A pointer to this struct custom_cursor_ object is stored in member \c custom_cursor of the
window's \ref wld_window.
Function \c Fl_Wayland_Window_Driver::set_cursor_4args() is also called when a window with a custom
@@ -823,7 +823,7 @@ struct wld_window {
struct xdg_popup *xdg_popup; // for POPUP windows
struct xdg_toplevel *xdg_toplevel; // for UNFRAMED windows
};
- struct custom_cursor {
+ struct custom_cursor_ {
struct wl_cursor *wl_cursor;
const Fl_RGB_Image *rgb;
int hotx, hoty;
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H
index 59df79f41..9ab0807aa 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H
@@ -144,7 +144,7 @@ struct wld_window {
struct xdg_popup *xdg_popup;
struct xdg_toplevel *xdg_toplevel;
};
- struct custom_cursor {
+ struct custom_cursor_ {
struct wl_cursor *wl_cursor;
const Fl_RGB_Image *rgb;
int hotx, hoty;
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 969deb485..a6c31ced2 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -79,7 +79,7 @@ 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) {
- struct wld_window::custom_cursor *custom = xid->custom_cursor;
+ struct wld_window::custom_cursor_ *custom = xid->custom_cursor;
if (custom) {
struct wl_cursor *wl_cursor = custom->wl_cursor;
struct cursor_image *new_image = (struct cursor_image*)wl_cursor->images[0];
@@ -1512,7 +1512,7 @@ int Fl_Wayland_Window_Driver::set_cursor_4args(const Fl_RGB_Image *rgb, int hotx
// 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 = new struct wld_window::custom_cursor_;
xid->custom_cursor->wl_cursor = new_cursor;
xid->custom_cursor->rgb = rgb;
xid->custom_cursor->hotx = hotx;
--
cgit v1.2.3