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

Commit 0736837

Browse files
committed
Merge pull request #476 from adobe/jeff/fix-9597
Don't Center Popups if Size and Width aren't parsed
2 parents 59a44cb + 38f4ead commit 0736837

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

appshell/client_handler_win.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ bool ClientHandler::OnKeyEvent(CefRefPtr<CefBrowser> browser,
123123

124124
void ClientHandler::ComputePopupPlacement(CefWindowInfo& windowInfo)
125125
{
126+
// both must be set to work
127+
if (windowInfo.width == CW_USEDEFAULT ||
128+
windowInfo.height == CW_USEDEFAULT) {
129+
// force both vals to be CW_USEDEFAULT in this
130+
// case because Windows doesn't correctly handle
131+
// only one value being is supplied on input
132+
windowInfo.width = CW_USEDEFAULT;
133+
windowInfo.height = CW_USEDEFAULT;
134+
return;
135+
}
136+
126137
RECT rectMainWnd;
127138
gMainWnd->GetWindowRect(&rectMainWnd);
128139

0 commit comments

Comments
 (0)