Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #476 from adobe/jeff/fix-9597
Browse files Browse the repository at this point in the history
Don't Center Popups if Size and Width aren't parsed
  • Loading branch information
redmunds committed Oct 20, 2014
2 parents 330764d + be27fe7 commit e9cd327
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions appshell/client_handler_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ bool ClientHandler::OnKeyEvent(CefRefPtr<CefBrowser> 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);

Expand Down

0 comments on commit e9cd327

Please sign in to comment.