From 780a41e0d64e92fc8d2654dc5c4e03650d600b16 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 24 Jan 2026 16:51:12 +0100 Subject: [PATCH] Fix "Setting window custom cursor from SVG image crashes" - cont'd (#1363) --- src/Fl_x.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index dfbc5311e..99bc52a64 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -3137,12 +3137,11 @@ int Fl_X11_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int ho if ((hoty < 0) || (hoty >= image->h())) return 0; - float s = ((Fl_RGB_Image*)image)->as_svg_image() ? Fl::screen_scale(pWindow->screen_num()) : 1; - cursor = XcursorImageCreate(image->w() * s, image->h() * s); + cursor = XcursorImageCreate(image->w(), image->h()); if (!cursor) return 0; - image = (Fl_RGB_Image*)image->copy(image->w() * s, image->h() * s); + image = (Fl_RGB_Image*)image->copy(image->w(), image->h()); ((Fl_RGB_Image*)image)->normalize(); const int extra_data = image->ld() ? (image->ld()-image->w()*image->d()) : 0; const uchar *i = (const uchar*)*image->data();