Module: wine
Branch: master
Commit: 8f7483d04baedbed23bcf76c7988458ebd65c294
URL: https://gitlab.winehq.org/wine/wine/-/commit/8f7483d04baedbed23bcf76c798845…
Author: Brendan Shanks <bshanks(a)codeweavers.com>
Date: Thu Oct 12 21:39:05 2023 -0700
winemac.drv: Fix redundant calls to [NSCursor set].
Since self.cursorFrames is a copy property, its pointer value will only
equal frames when both are nil. Also return early from the function if
the array contents are equivalent.
---
dlls/winemac.drv/cocoa_app.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index 881f0a50e02..c1a35af5a00 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -1048,7 +1048,7 @@ static NSString* WineLocalizedString(unsigned int stringID)
- (void) setCursorWithFrames:(NSArray*)frames
{
- if (self.cursorFrames == frames)
+ if (self.cursorFrames == frames || [self.cursorFrames isEqualToArray:frames])
return;
self.cursorFrames = frames;