winemac: Fix a crash on versions of OS X prior to 10.9 which don't have the -[NSImage drawInRect:] method.

[image drawInRect:rect] is documented as being "exactly equivalent to calling
[image drawInRect:rect fromRect:NSZeroRect operation:NSCompositeSourceOver
fraction:1 respectFlipped:YES hints:nil]".  So, that's what I replace it with.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ken Thomases 2015-11-10 02:29:18 -06:00 committed by Alexandre Julliard
parent b06ff1e55f
commit 682820d3cb
1 changed files with 6 additions and 1 deletions

View File

@ -1841,7 +1841,12 @@ - (void) grabDockIconSnapshotFromWindow:(WineWindow*)window force:(BOOL)force
}
CGContextDrawImage(cgcontext, rect, windowImage);
[appImage drawInRect:NSMakeRect(156, 4, 96, 96)];
[appImage drawInRect:NSMakeRect(156, 4, 96, 96)
fromRect:NSZeroRect
operation:NSCompositeSourceOver
fraction:1
respectFlipped:YES
hints:nil];
[dockIcon unlockFocus];