--- old/src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp 2017-03-10 14:13:59.777395718 -0800 +++ new/src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp 2017-03-10 14:13:59.585395718 -0800 @@ -521,12 +521,18 @@ AwtComponent *awtParent = (parent != NULL) ? (AwtComponent *)JNI_GET_PDATA(parent) : NULL; HWND hwndOwner = awtParent ? awtParent->GetHWnd() : NULL; + jboolean doIt = JNI_FALSE; // Assume the user will cancel the dialog. PAGESETUPDLG setup; memset(&setup, 0, sizeof(setup)); setup.lStructSize = sizeof(setup); + HWND parentID = AwtPrintControl::getParentID(env, self); + if (parentID != NULL) { + // windows native modality is requested (used by JavaFX). + setup.hwndOwner = parentID; + } /* Fix for 6488834. To disable Win32 native parent modality we have to set @@ -534,7 +540,7 @@ parentless dialogs we use NULL to show them in the taskbar, and for all other dialogs AwtToolkit's HWND is used. */ - if (awtParent != NULL) + else if (awtParent != NULL) { setup.hwndOwner = AwtToolkit::GetInstance().GetHWnd(); }