diff options
| author | Manolo Gouy <Manolo> | 2016-10-04 11:29:57 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-10-04 11:29:57 +0000 |
| commit | 31070778b7c7d32e90931f52dbafefddcb2db74d (patch) | |
| tree | f6026e67e23ac5a728f45b02f1436e17f097e9e5 | |
| parent | 6d616d3263ff581918df0743d515ce7561df7366 (diff) | |
Fix for STR#3308 - MacOS X-specific part.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12009 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_cocoa.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 4fc12125d..9329383b5 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3606,6 +3606,7 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int // Alpha needs to be premultiplied for this format const uchar *i = (const uchar*)*image->data(); + const int extra_data = image->ld() ? (image->ld() - image->w() * image->d()) : 0; unsigned char *o = [bitmap bitmapData]; for (int y = 0;y < image->h();y++) { if (!(image->d() & 1)) { @@ -3629,7 +3630,7 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int o += len; i += len; } - i += image->ld(); + i += extra_data; } NSImage *nsimage = [[NSImage alloc] |
