diff --git a/tests/cefclient/browser_window_std_win.cc b/tests/cefclient/browser_window_std_win.cc index fc88fa97c..90c33a0f0 100644 --- a/tests/cefclient/browser_window_std_win.cc +++ b/tests/cefclient/browser_window_std_win.cc @@ -45,7 +45,9 @@ void BrowserWindowStdWin::ShowPopup(HWND parent_hwnd, HWND hwnd = GetHWND(); if (hwnd) { SetParent(hwnd, parent_hwnd); - SetWindowPos(hwnd, NULL, x, y, width, height, SWP_NOZORDER); + SetWindowPos(hwnd, NULL, x, y, + static_cast(width), static_cast(height), + SWP_NOZORDER); ShowWindow(hwnd, SW_SHOW); } } @@ -76,7 +78,9 @@ void BrowserWindowStdWin::SetBounds(int x, int y, size_t width, size_t height) { HWND hwnd = GetHWND(); if (hwnd) { // Set the browser window bounds. - SetWindowPos(hwnd, NULL, x, y, width, height, SWP_NOZORDER); + SetWindowPos(hwnd, NULL, x, y, + static_cast(width), static_cast(height), + SWP_NOZORDER); } } diff --git a/tests/cefclient/osr_window_win.cc b/tests/cefclient/osr_window_win.cc index bd2ebc900..87e19c11d 100644 --- a/tests/cefclient/osr_window_win.cc +++ b/tests/cefclient/osr_window_win.cc @@ -114,7 +114,9 @@ void OsrWindowWin::ShowPopup(HWND parent_hwnd, DCHECK(browser_.get()); // Create the native window. - const RECT rect = {x, y, x + width, y + height}; + const RECT rect = {x, y, + x + static_cast(width), + y + static_cast(height)}; Create(parent_hwnd, rect); // Send resize notification so the compositor is assigned the correct @@ -178,7 +180,9 @@ void OsrWindowWin::SetBounds(int x, int y, size_t width, size_t height) { if (hwnd_) { // Set the browser window bounds. - ::SetWindowPos(hwnd_, NULL, x, y, width, height, SWP_NOZORDER); + ::SetWindowPos(hwnd_, NULL, x, y, + static_cast(width), static_cast(height), + SWP_NOZORDER); } }