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_win32.cxx | |
| parent | bb74d263e25720dc3f4103df489853739de1bd9f (diff) | |
Allow scaled image in Fl_Window::cursor(const Fl_RGB_Image *, int, int)
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 245225795..033c809db 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -2530,8 +2530,9 @@ int Fl_WinAPI_Window_Driver::set_cursor(Fl_Cursor c) { int Fl_WinAPI_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int hoty) { HCURSOR new_cursor; - - new_cursor = image_to_icon(image, false, hotx, hoty); + Fl_RGB_Image *scaled_image = (Fl_RGB_Image*)image->copy(); + new_cursor = image_to_icon(scaled_image, false, hotx, hoty); + delete scaled_image; if (new_cursor == NULL) return 0; |
