JBR-1271 Wrong parent of native windows dialogs

Set a proper parent to a dialog window
This commit is contained in:
Vyacheslav Moklev
2019-03-13 13:50:50 +03:00
committed by Vitaly Provodin
parent 24508041d9
commit d47131b7ab

View File

@@ -647,7 +647,12 @@ AwtFileDialog::Show(void *p)
parentless dialogs we use NULL to show them in the taskbar,
and for all other dialogs AwtToolkit's HWND is used.
*/
HWND hwndOwner = awtParent ? AwtToolkit::GetInstance().GetHWnd() : NULL;
/* [moklev] This fix does not needed anymore
* Tested on Windows 10 with example from JDK-4080029
* Revert the fix and set the proper parent to keep correct position of modal dialogs
*/
// HWND hwndOwner = awtParent ? AwtToolkit::GetInstance().GetHWnd() : NULL;
HWND hwndOwner = awtParent ? awtParent->GetHWnd() : NULL;
if (title == NULL || env->GetStringLength(title)==0) {
title = JNU_NewStringPlatform(env, L" ");