From b12a80e386b12d9d8fa63cf07124f8da989dcd04 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 9 Sep 2019 09:29:43 +0200 Subject: Bug 1393: Run orderFront0(=setVisible) async off-thread on AppKit after sync AppKit NSWindow creation MacOS 10.14.6 + OpenJDK11U produces occasional freezes on AppKit Main Thread Latest manual tests after resolving Bug 1389 disclosed a few occasional freezes using NEWT + Java11. These are related to probable AWT changes since Java8, as these do not occur with Java8. Fix: Spun off orderFront0(=setVisible) async off-thread on AppKit after sync AppKit NSWindow creation. This fix also aligns the macos createWindow code with the new simplified ios implementation, see commit 004c67c73a0309158c30929cd0d6513e23f34803 --- src/newt/native/MacNewtNSWindow.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/newt/native/MacNewtNSWindow.m') diff --git a/src/newt/native/MacNewtNSWindow.m b/src/newt/native/MacNewtNSWindow.m index 96dff76f6..e75890349 100644 --- a/src/newt/native/MacNewtNSWindow.m +++ b/src/newt/native/MacNewtNSWindow.m @@ -898,8 +898,9 @@ NS_ENDHANDLER realized = YES; withinLiveResize = JNI_FALSE; - DBG_PRINT("NewtWindow::create: %p, realized %d, hasPresentationSwitch %d[defaultOptions 0x%X, fullscreenOptions 0x%X], (refcnt %d)\n", - res, realized, (int)hasPresentationSwitch, (int)defaultPresentationOptions, (int)fullscreenPresentationOptions, (int)[res retainCount]); + DBG_PRINT("NewtWindow::create: %p, realized %d, hasPresentationSwitch %d[defaultOptions 0x%X, fullscreenOptions 0x%X], view %p (refcnt %d)\n", + res, realized, (int)hasPresentationSwitch, (int)defaultPresentationOptions, (int)fullscreenPresentationOptions, + (void *)[self contentView], (int)[res retainCount]); return res; } -- cgit v1.2.3