[PATCH 1/3] winemac: Make some operations on Cocoa views asynchronous.

Ken Thomases ken at codeweavers.com
Wed Feb 1 10:12:29 CST 2017


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

Signed-off-by: Ken Thomases <ken at codeweavers.com>
---
 dlls/winemac.drv/cocoa_window.m | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index a68ba03..57587d9 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -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];
     });
 
-- 
2.10.2




More information about the wine-patches mailing list