On Wed, 13 Oct 2021 20:02:10 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> Yea, that makes sense. I'm stuck on how to check for whether the blocker >> window was in focus since by the time setModalBlocked(false) is called the >> blocker window is no longer in focus. Do you have any suggestions on how to >> approach this? > > probably it is possible to save the state of the closed dialog before closing > it and pass it here? This class is not a public API you can change the > parameters in these methods. I wasn't able to find when or where the dialog ever becomes active, and I actually think now that it never does become active window. I checked Apple's documentation on NSPrintPanel and turns out that it doesn't even inherit from NSPanel nor NSWindow so it can never become a key window (active status). Looks like it should be safe to not check for active status because a print dialog popup should block all other windows in the application anyway, so it will always be "active" window. https://developer.apple.com/documentation/appkit/nsprintpanel?language=objc This is also the case for page setup and NSPageLayout. https://developer.apple.com/documentation/appkit/nspagelayout?language=objc ------------- PR: https://git.openjdk.java.net/jdk/pull/5884