cefclient: Add option to create default popups (see issue #3165, see issue #3294)

This change adds a `--use-default-popup` command-line option to cefclient. When
specified, popup windows will be created with default styling (e.g. without an
application-provided native parent window).

This change also adds some reasonable default window bounds in cases where they
are not specified by the client.
This commit is contained in:
Marshall Greenblatt
2022-04-11 16:54:33 -04:00
parent 3000bc8748
commit 75ca552a4e
10 changed files with 46 additions and 6 deletions

View File

@@ -178,6 +178,11 @@ void CefBrowserPlatformDelegateNativeWin::BrowserDestroyed(
bool CefBrowserPlatformDelegateNativeWin::CreateHostWindow() {
RegisterWindowClass();
if (window_info_.style == 0) {
// Client didn't intialize the CefWindowInfo. Provide reasonable defaults.
window_info_.SetAsPopup(nullptr, CefString());
}
has_frame_ = !(window_info_.style & WS_CHILD);
std::wstring windowName(CefString(&window_info_.window_name));