diff --git a/appshell/client_handler_win.cpp b/appshell/client_handler_win.cpp index e758852fc..f09152b3e 100644 --- a/appshell/client_handler_win.cpp +++ b/appshell/client_handler_win.cpp @@ -123,6 +123,17 @@ 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) { + // 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; + } + RECT rectMainWnd; gMainWnd->GetWindowRect(&rectMainWnd);