Windows: Wait for WM_NCDESTROY before calling OnBeforeClose (issue #2248)

This commit is contained in:
Marshall Greenblatt 2017-08-31 18:10:51 -04:00
parent dddfce456c
commit ed5208366c
3 changed files with 4 additions and 4 deletions

View File

@ -595,7 +595,7 @@ LRESULT CALLBACK CefBrowserPlatformDelegateNativeWin::WndProc(HWND hwnd,
// Allow the close.
break;
case WM_DESTROY:
case WM_NCDESTROY:
if (platform_delegate) {
// Clear the user data pointer.
gfx::SetWindowUserData(hwnd, NULL);
@ -605,7 +605,7 @@ LRESULT CALLBACK CefBrowserPlatformDelegateNativeWin::WndProc(HWND hwnd,
// CreateHostWindow().
browser->WindowDestroyed();
}
return 0;
break;
case WM_SIZE:
if (platform_delegate && platform_delegate->window_widget_) {

View File

@ -140,7 +140,7 @@ MainMessageLoopMultithreadedWin::MessageWndProc(HWND hWnd,
task->Release();
} else {
switch (message) {
case WM_DESTROY:
case WM_NCDESTROY:
// Clear the reference to |self|.
SetUserDataPtr(hWnd, NULL);
break;

View File

@ -634,7 +634,7 @@ LRESULT CALLBACK RootWindowWin::RootWndProc(HWND hWnd,
SetUserDataPtr(hWnd, NULL);
self->hwnd_ = NULL;
self->OnDestroyed();
return 0;
break;
}
return DefWindowProc(hWnd, message, wParam, lParam);