diff options
Diffstat (limited to 'widget/cocoa/nsCursorManager.mm')
-rw-r--r-- | widget/cocoa/nsCursorManager.mm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/widget/cocoa/nsCursorManager.mm b/widget/cocoa/nsCursorManager.mm index 2db20681ad..11a37f59b7 100644 --- a/widget/cocoa/nsCursorManager.mm +++ b/widget/cocoa/nsCursorManager.mm @@ -304,19 +304,17 @@ static constexpr nsCursor kCustomCursor = eCursorCount; return NS_ERROR_FAILURE; } + const NSSize cocoaSize = NSMakeSize(size.width, size.height); NSImage* cursorImage; nsresult rv = nsCocoaUtils::CreateNSImageFromImageContainer( aCursor.mContainer, imgIContainer::FRAME_FIRST, nullptr, nullptr, - &cursorImage, scaleFactor); + cocoaSize, &cursorImage, scaleFactor); if (NS_FAILED(rv) || !cursorImage) { return NS_ERROR_FAILURE; } - { - NSSize cocoaSize = NSMakeSize(size.width, size.height); - [cursorImage setSize:cocoaSize]; - [[[cursorImage representations] objectAtIndex:0] setSize:cocoaSize]; - } + [cursorImage setSize:cocoaSize]; + [[[cursorImage representations] objectAtIndex:0] setSize:cocoaSize]; // if the hotspot is nonsensical, make it 0,0 uint32_t hotspotX = |