From a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 17:12:12 +0200 Subject: Merging upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- widget/cocoa/nsCursorManager.mm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'widget/cocoa/nsCursorManager.mm') diff --git a/widget/cocoa/nsCursorManager.mm b/widget/cocoa/nsCursorManager.mm index 6596df25a3..e480f48da6 100644 --- a/widget/cocoa/nsCursorManager.mm +++ b/widget/cocoa/nsCursorManager.mm @@ -238,11 +238,14 @@ static constexpr nsCursor kCustomCursor = eCursorCount; } - (nsresult)setCustomCursor:(const nsIWidget::Cursor&)aCursor - widgetScaleFactor:(CGFloat)scaleFactor { + widgetScaleFactor:(CGFloat)scaleFactor + forceUpdate:(bool)aForceUpdate { NS_OBJC_BEGIN_TRY_BLOCK_RETURN; - // As the user moves the mouse, this gets called repeatedly with the same aCursorImage - if (sCurrentCursor == aCursor && sCurrentCursorScaleFactor == scaleFactor && mCurrentMacCursor) { + // As the user moves the mouse, this gets called repeatedly with the same + // aCursorImage + if (!aForceUpdate && sCurrentCursor == aCursor && + sCurrentCursorScaleFactor == scaleFactor && mCurrentMacCursor) { // Native dragging can unset our cursor apparently (see bug 1739352). if (MOZ_UNLIKELY(![mCurrentMacCursor isSet])) { [mCurrentMacCursor set]; -- cgit v1.2.3