Use CefRect for CefWindowInfo bounds (fixes issue #1515)

This commit is contained in:
Marshall Greenblatt
2021-09-27 11:48:30 +03:00
parent 41b64e428c
commit 23be17f693
16 changed files with 148 additions and 121 deletions

View File

@@ -24,8 +24,7 @@ void BrowserWindowStdWin::CreateBrowser(
REQUIRE_MAIN_THREAD();
CefWindowInfo window_info;
RECT wnd_rect = {rect.x, rect.y, rect.x + rect.width, rect.y + rect.height};
window_info.SetAsChild(parent_handle, wnd_rect);
window_info.SetAsChild(parent_handle, rect);
if (GetWindowLongPtr(parent_handle, GWL_EXSTYLE) & WS_EX_NOACTIVATE) {
// Don't activate the browser window on creation.
@@ -44,7 +43,7 @@ void BrowserWindowStdWin::GetPopupConfig(CefWindowHandle temp_handle,
CEF_REQUIRE_UI_THREAD();
// The window will be properly sized after the browser is created.
windowInfo.SetAsChild(temp_handle, RECT());
windowInfo.SetAsChild(temp_handle, CefRect());
// Don't activate the hidden browser window on creation.
windowInfo.ex_style |= WS_EX_NOACTIVATE;