summaryrefslogtreecommitdiff
path: root/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-02-15 22:52:20 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-02-15 22:52:20 +0100
commitf6b87790ccf201cafbb5b6b0347cc365dfe4d265 (patch)
tree51fbb825a869034328f4c0dc1c441e5631491449 /src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
parent6fbfaba19d0a2d2dc7080e450d5055ff19ac89e1 (diff)
Wayland: new struct wl_cursor *custom_cursor member variable
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index d0183ee46..0b8ee348a 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -268,8 +268,7 @@ static void pointer_enter(void *data,
{
Fl_Window *win = event_coords_from_surface(surface, surface_x, surface_y);
if (!win) return;
- Fl_Wayland_Window_Driver *driver = Fl_Wayland_Window_Driver::driver(win);
- struct wl_cursor *cursor = driver->cursor(); // use custom cursor if present
+ struct wl_cursor *cursor = fl_wl_xid(win)->custom_cursor;// use custom cursor if present
struct seat *seat = (struct seat*)data;
do_set_cursor(seat, cursor);
seat->serial = serial;
@@ -439,7 +438,7 @@ static void cursor_surface_enter(void *data,
if (win) {
Fl_Wayland_Window_Driver *driver = Fl_Wayland_Window_Driver::driver(win);
//fprintf(stderr, "cursor_surface_enter: cursor_default=%d standard_cursor=%d\n", driver->cursor_default(), driver->standard_cursor());
- struct wl_cursor *cursor = driver->cursor();
+ struct wl_cursor *cursor = fl_wl_xid(win)->custom_cursor;
if (cursor) do_set_cursor(seat, cursor);
else if (driver->cursor_default()) driver->set_cursor(driver->cursor_default());
else win->cursor(driver->standard_cursor());