src/macosx/native/sun/awt/AWTView.m

Print this page

        

@@ -1241,11 +1241,10 @@
 
     NSRect rect = NSMakeRect(originX, originY, width, height);
     jobject cPlatformView = (*env)->NewGlobalRef(env, obj);
 
     [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
-        AWT_ASSERT_APPKIT_THREAD;
                                            
         CALayer *windowLayer = jlong_to_ptr(windowLayerPtr);
         AWTView *view = [[AWTView alloc] initWithRect:rect
                                          platformView:cPlatformView
                                          windowLayer:windowLayer];

@@ -1272,11 +1271,10 @@
 JNF_COCOA_ENTER(env);
     
     NSView *view = (NSView *)jlong_to_ptr(viewPtr);    
 
    [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
-       AWT_ASSERT_APPKIT_THREAD;
        
        if (toResize) {
            [view setAutoresizingMask: NSViewHeightSizable | NSViewWidthSizable];
        } else {
            [view setAutoresizingMask: NSViewMinYMargin | NSViewMaxXMargin];

@@ -1306,11 +1304,10 @@
     
     NSView *view = (NSView *)jlong_to_ptr(viewPtr);    
     NSWindow *window = [view window];
     
     [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
-            AWT_ASSERT_APPKIT_THREAD;
         
             ret = (jint)[[AWTWindow getNSWindowDisplayID_AppKitThread: window] intValue];
     }];
     
 JNF_COCOA_EXIT(env);

@@ -1334,11 +1331,10 @@
     
     __block NSRect rect = NSZeroRect;
     
     NSView *view = (NSView *)jlong_to_ptr(viewPtr);    
     [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
-        AWT_ASSERT_APPKIT_THREAD;
         
         NSRect viewBounds = [view bounds];
         NSRect frameInWindow = [view convertRect:viewBounds toView:nil];
         rect = [[view window] convertRectToScreen:frameInWindow];
         NSRect screenRect = [[NSScreen mainScreen] frame];

@@ -1365,12 +1361,10 @@
     
 JNF_COCOA_ENTER(env);
     
     NSView *nsView = OBJC(viewPtr);
    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
-       AWT_ASSERT_APPKIT_THREAD;
-       
        NSPoint ptWindowCoords = [[nsView window] mouseLocationOutsideOfEventStream];
        NSPoint ptViewCoords = [nsView convertPoint:ptWindowCoords fromView:nil];
        underMouse = [nsView hitTest:ptViewCoords] != nil;
     }];