Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions appshell/cef_main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,6 @@ BOOL cef_main_window::HandleGetMinMaxInfo(LPMINMAXINFO mmi)
return TRUE;
}

// WM_DESTROY handler
BOOL cef_main_window::HandleDestroy()
{
::PostQuitMessage(0);
return TRUE;
}

// WM_CLOSE handler
BOOL cef_main_window::HandleClose()
{
Expand Down Expand Up @@ -505,8 +498,7 @@ LRESULT cef_main_window::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
return 0L;
break;
case WM_DESTROY:
if (HandleDestroy())
return 0L;
return 0L; // Do not handle the destroy here.
break;
case WM_CLOSE:
if (HandleClose())
Expand Down
1 change: 0 additions & 1 deletion appshell/cef_main_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class cef_main_window : public cef_host_window
BOOL HandleEraseBackground(HDC hdc);
BOOL HandleCreate();
BOOL HandleSetFocus(HWND hLosingFocus);
BOOL HandleDestroy();
BOOL HandleClose();
BOOL HandleInitMenuPopup(HMENU hMenuPopup);
BOOL HandleCommand(UINT commandId);
Expand Down
7 changes: 6 additions & 1 deletion appshell/client_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ void ClientHandler::OnBeforeClose(CefRefPtr<CefBrowser> browser) {
}

if (m_quitting) {
DispatchCloseToNextBrowser();
// Changed the logic to call CefQuitMesaageLoop()
// for windows as it was crashing with 2171 CEF.
if (HasWindows())
DispatchCloseToNextBrowser();
else
CefQuitMessageLoop();
}
}

Expand Down