diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /widget/cocoa/nsCursorManager.mm | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 = |