mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-1269 Common Item Dialog does not appear on Alt+Tab or click in windows toolbar
JBR-1270 Common Item Dialog does not have an icon Select a proper window handle
This commit is contained in:
committed by
jbrbot
parent
d2f3d01f6d
commit
76cd0cf12d
@@ -538,10 +538,9 @@ private:
|
||||
HWND hdlg;
|
||||
OLE_HRT(pWindow->GetWindow(&hdlg));
|
||||
|
||||
HWND parent = ::GetParent(hdlg);
|
||||
jobject peer = data->peer;
|
||||
env->CallVoidMethod(peer, AwtFileDialog::setHWndMID, (jlong)parent);
|
||||
::SetProp(parent, ModalDialogPeerProp, reinterpret_cast<HANDLE>(peer));
|
||||
env->CallVoidMethod(peer, AwtFileDialog::setHWndMID, (jlong)hdlg);
|
||||
::SetProp(hdlg, ModalDialogPeerProp, reinterpret_cast<HANDLE>(peer));
|
||||
|
||||
// fix for 4508670 - disable CS_SAVEBITS
|
||||
DWORD style = ::GetClassLong(hdlg, GCL_STYLE);
|
||||
@@ -550,13 +549,13 @@ private:
|
||||
// set appropriate icon for parentless dialogs
|
||||
jobject awtParent = env->GetObjectField(peer, AwtFileDialog::parentID);
|
||||
if (awtParent == NULL) {
|
||||
::SendMessage(parent, WM_SETICON, (WPARAM)ICON_BIG,
|
||||
::SendMessage(hdlg, WM_SETICON, (WPARAM)ICON_BIG,
|
||||
(LPARAM)AwtToolkit::GetInstance().GetAwtIcon());
|
||||
} else {
|
||||
AwtWindow *awtWindow = (AwtWindow *)JNI_GET_PDATA(awtParent);
|
||||
::SendMessage(parent, WM_SETICON, (WPARAM)ICON_BIG,
|
||||
::SendMessage(hdlg, WM_SETICON, (WPARAM)ICON_BIG,
|
||||
(LPARAM)(awtWindow->GetHIcon()));
|
||||
::SendMessage(parent, WM_SETICON, (WPARAM)ICON_SMALL,
|
||||
::SendMessage(hdlg, WM_SETICON, (WPARAM)ICON_SMALL,
|
||||
(LPARAM)(awtWindow->GetHIconSm()));
|
||||
env->DeleteLocalRef(awtParent);
|
||||
}
|
||||
@@ -831,7 +830,7 @@ AwtFileDialog::Show(void *p)
|
||||
|
||||
AwtDialog::ModalActivateNextWindow(NULL, target, peer);
|
||||
|
||||
if (useCommonItemDialog) {
|
||||
if (!useCommonItemDialog) {
|
||||
VERIFY(::SetCurrentDirectory(currentDirectory));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user