Windows: Avoid resizing the child window to 0x0 when the parent window is minimized (issue #606).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@653 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2012-05-29 17:39:39 +00:00
parent b3f982dd73
commit 71773b5bbc
2 changed files with 7 additions and 2 deletions

View File

@ -118,7 +118,9 @@ LRESULT CALLBACK CefBrowserHostImpl::WndProc(HWND hwnd, UINT message,
return 0;
case WM_SIZE:
if (browser) {
// Minimizing resizes the window to 0x0 which causes our layout to go all
// screwy, so we just ignore it.
if (wParam != SIZE_MINIMIZED && browser) {
// resize the web view window to the full size of the browser window
RECT rc;
GetClientRect(hwnd, &rc);

View File

@ -442,7 +442,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
return 0;
case WM_SIZE:
if (g_handler.get() && g_handler->GetBrowser()) {
// Minimizing resizes the window to 0x0 which causes our layout to go all
// screwy, so we just ignore it.
if (wParam != SIZE_MINIMIZED && g_handler.get() &&
g_handler->GetBrowser()) {
CefWindowHandle hwnd =
g_handler->GetBrowser()->GetHost()->GetWindowHandle();
if (hwnd) {