From 4c361b835a32143d38d0f127936bae336de1b911 Mon Sep 17 00:00:00 2001 From: Jeff Booher Date: Sun, 19 Oct 2014 06:45:18 -0700 Subject: [PATCH 1/2] fix 9597 --- appshell/client_handler_win.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appshell/client_handler_win.cpp b/appshell/client_handler_win.cpp index e758852fc..c39572f31 100644 --- a/appshell/client_handler_win.cpp +++ b/appshell/client_handler_win.cpp @@ -123,6 +123,12 @@ bool ClientHandler::OnKeyEvent(CefRefPtr browser, void ClientHandler::ComputePopupPlacement(CefWindowInfo& windowInfo) { + // both must be set to work + if (windowInfo.width == CW_USEDEFAULT || + windowInfo.height == CW_USEDEFAULT) { + return; + } + RECT rectMainWnd; gMainWnd->GetWindowRect(&rectMainWnd); From be27fe704c70ecad8c7a17395013842f3677129e Mon Sep 17 00:00:00 2001 From: Jeff Booher Date: Mon, 20 Oct 2014 08:15:06 -0700 Subject: [PATCH 2/2] rest hieght/width if only 1 value supplied --- appshell/client_handler_win.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appshell/client_handler_win.cpp b/appshell/client_handler_win.cpp index c39572f31..f09152b3e 100644 --- a/appshell/client_handler_win.cpp +++ b/appshell/client_handler_win.cpp @@ -126,6 +126,11 @@ bool ClientHandler::OnKeyEvent(CefRefPtr browser, // both must be set to work if (windowInfo.width == CW_USEDEFAULT || windowInfo.height == CW_USEDEFAULT) { + // force both vals to be CW_USEDEFAULT in this + // case because Windows doesn't correctly handle + // only one value being is supplied on input + windowInfo.width = CW_USEDEFAULT; + windowInfo.height = CW_USEDEFAULT; return; }