diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2026-01-24 16:43:12 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2026-01-24 16:43:12 +0100 |
| commit | 188aa0be0ed5e366a35d521d173c6248137ba8a6 (patch) | |
| tree | 84e5f3c375d23e390b934ee05ea2f6a5892f9ded /src | |
| parent | bd4ad3e4a0c8e3153d9d3b532d9c572f5aaad897 (diff) | |
Fix "Setting window custom cursor from SVG image crashes" - cont'd (#1363)
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_x.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 2afa2e9ae..fce02de32 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -3142,12 +3142,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 = 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(); |
