Browse Source

Restore commented out logic of preventing parent of modal window being able to close, which cause user-after-free afterwards.

master
roytam1 4 years ago
parent
commit
9e62f4fe1a
  1. 8
      k-meleon/app/BrowserFrm.cpp

8
k-meleon/app/BrowserFrm.cpp

@ -1426,7 +1426,7 @@ INT_PTR CBrowserFrame::DoModal()
CWinApp* pApp = AfxGetApp();
if (pApp != NULL)
pApp->EnableModeless(FALSE);
/*
HWND hWndTop = NULL;
HWND hWndParent = CWnd::GetSafeOwner_(GetParent()->GetSafeHwnd(), &hWndTop);
@ -1436,11 +1436,11 @@ INT_PTR CBrowserFrame::DoModal()
::EnableWindow(hWndParent, FALSE);
::EnableWindow(m_hWnd, TRUE);
bEnableParent = TRUE;
}*/
}
m_nFlags |= WF_CONTINUEMODAL;
RunModalLoop(0);
/*
if (bEnableParent)
::EnableWindow(hWndParent, TRUE);
if (hWndParent != NULL && ::GetActiveWindow() == m_hWnd)
@ -1448,7 +1448,7 @@ INT_PTR CBrowserFrame::DoModal()
if (::IsWindow(hWndTop))
::EnableWindow(hWndTop, TRUE);
*/
if (pApp != NULL)
pApp->EnableModeless(TRUE);

Loading…
Cancel
Save