diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-02-13 12:11:04 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-02-13 12:11:04 +0100 |
| commit | f459fdb6374a81a7ebb2fdc95e6dd7ec7041c3ec (patch) | |
| tree | e125f30f2ad6374020ce7b64f2d7850785cbd540 /src/Fl_x.cxx | |
| parent | bb74d263e25720dc3f4103df489853739de1bd9f (diff) | |
Allow scaled image in Fl_Window::cursor(const Fl_RGB_Image *, int, int)
Diffstat (limited to 'src/Fl_x.cxx')
| -rw-r--r-- | src/Fl_x.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 6855f9915..0a8f80d50 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -2934,6 +2934,7 @@ int Fl_X11_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int ho if (!cursor) return 0; + image = (Fl_RGB_Image*)image->copy(); const int extra_data = image->ld() ? (image->ld()-image->w()*image->d()) : 0; const uchar *i = (const uchar*)*image->data(); XcursorPixel *o = cursor->pixels; @@ -2984,7 +2985,7 @@ int Fl_X11_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int ho XFreeCursor(fl_display, xc); XcursorImageDestroy(cursor); - + delete image; return 1; #endif } |
