alloy: win: Focus the browser after dismissal of a modal dialog (fixes issue #3361)
This commit is contained in:
parent
dac76df7e3
commit
418ae98476
|
@ -677,6 +677,15 @@ LRESULT CALLBACK CefBrowserPlatformDelegateNativeWin::WndProc(HWND hwnd,
|
|||
rect->bottom - rect->top, SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_ENABLE:
|
||||
if (wParam == TRUE && browser) {
|
||||
// Give focus to the browser after EnableWindow enables this window
|
||||
// (e.g. after a modal dialog is dismissed).
|
||||
browser->SetFocus(true);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return DefWindowProc(hwnd, message, wParam, lParam);
|
||||
|
|
|
@ -539,6 +539,15 @@ LRESULT CALLBACK RootWindowWin::RootWndProc(HWND hWnd,
|
|||
self->OnFocus();
|
||||
return 0;
|
||||
|
||||
case WM_ENABLE:
|
||||
if (wParam == TRUE) {
|
||||
// Give focus to the browser after EnableWindow enables this window
|
||||
// (e.g. after a modal dialog is dismissed).
|
||||
self->OnFocus();
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
self->OnSize(wParam == SIZE_MINIMIZED);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue