summaryrefslogtreecommitdiff
path: root/src/Fl_win32.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-02-13 12:11:04 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-02-13 12:11:04 +0100
commitf459fdb6374a81a7ebb2fdc95e6dd7ec7041c3ec (patch)
treee125f30f2ad6374020ce7b64f2d7850785cbd540 /src/Fl_win32.cxx
parentbb74d263e25720dc3f4103df489853739de1bd9f (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.cxx5
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;