src/macosx/native/sun/awt/AWTView.m
Print this page
*** 1241,1251 ****
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];
--- 1241,1250 ----
*** 1272,1282 ****
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];
--- 1271,1280 ----
*** 1306,1316 ****
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);
--- 1304,1313 ----
*** 1334,1344 ****
__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];
--- 1331,1340 ----
*** 1365,1376 ****
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;
}];
--- 1361,1370 ----