winemac: Make some operations on Cocoa views asynchronous.

There's no reason for them to be synchronous and this improves performance.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ken Thomases 2017-02-01 10:12:29 -06:00 committed by Alexandre Julliard
parent 6d89be5496
commit 733e22d0c1

View File

@ -3340,7 +3340,7 @@ void macdrv_set_view_frame(macdrv_view v, CGRect rect)
if (CGRectIsNull(rect)) rect = CGRectZero;
OnMainThread(^{
OnMainThreadAsync(^{
NSRect newFrame = NSRectFromCGRect(cgrect_mac_from_win(rect));
NSRect oldFrame = [view frame];
@ -3387,7 +3387,7 @@ void macdrv_set_view_superview(macdrv_view v, macdrv_view s, macdrv_window w, ma
if (!superview)
superview = [window contentView];
OnMainThread(^{
OnMainThreadAsync(^{
if (superview == [view superview])
{
NSArray* subviews = [superview subviews];
@ -3430,7 +3430,7 @@ void macdrv_set_view_hidden(macdrv_view v, int hidden)
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
WineContentView* view = (WineContentView*)v;
OnMainThread(^{
OnMainThreadAsync(^{
[view setHidden:hidden];
});