| Index: content/browser/renderer_host/render_widget_host_view_win.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
|
| index 793ea259e07f1587c8c8c4f7f66ed05898f10bb2..001004d01836dd5cb8150f0e0f98fe121f722279 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_win.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_win.cc
|
| @@ -659,7 +659,6 @@ void RenderWidgetHostViewWin::InitAsChild(
|
|
|
| void RenderWidgetHostViewWin::InitAsPopup(
|
| RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) {
|
| - close_on_deactivate_ = true;
|
| DoPopupOrFullscreenInit(parent_host_view->GetNativeView(), pos,
|
| WS_EX_TOOLWINDOW);
|
| }
|
| @@ -1616,8 +1615,7 @@ void RenderWidgetHostViewWin::OnCancelMode() {
|
| if (render_widget_host_)
|
| render_widget_host_->LostCapture();
|
|
|
| - if ((is_fullscreen_ || close_on_deactivate_) &&
|
| - !weak_factory_.HasWeakPtrs()) {
|
| + if (close_on_deactivate_ && !weak_factory_.HasWeakPtrs()) {
|
| // Dismiss popups and menus. We do this asynchronously to avoid changing
|
| // activation within this callstack, which may interfere with another window
|
| // being activated. We can synchronously hide the window, but we need to
|
| @@ -1896,7 +1894,7 @@ LRESULT RenderWidgetHostViewWin::OnMouseEvent(UINT message, WPARAM wparam,
|
| // RenderViewHostHWND as there is no way to retrieve it from the HWND.
|
|
|
| // Don't forward if the container is a popup or fullscreen widget.
|
| - if (!is_fullscreen_ && !close_on_deactivate_) {
|
| + if (!close_on_deactivate_) {
|
| switch (message) {
|
| case WM_LBUTTONDOWN:
|
| case WM_MBUTTONDOWN:
|
| @@ -1951,7 +1949,7 @@ LRESULT RenderWidgetHostViewWin::OnKeyEvent(UINT message, WPARAM wparam,
|
| // parent.
|
| // TODO(jcampan): http://b/issue?id=1192881 Could be abstracted in the
|
| // FocusManager.
|
| - if (close_on_deactivate_ &&
|
| + if (close_on_deactivate_ && !is_fullscreen_ &&
|
| (((message == WM_KEYDOWN || message == WM_KEYUP) && (wparam == VK_TAB)) ||
|
| (message == WM_CHAR && wparam == L'\t'))) {
|
| // First close the pop-up.
|
| @@ -2973,6 +2971,7 @@ void RenderWidgetHostViewWin::ShutdownHost() {
|
| void RenderWidgetHostViewWin::DoPopupOrFullscreenInit(HWND parent_hwnd,
|
| const gfx::Rect& pos,
|
| DWORD ex_style) {
|
| + close_on_deactivate_ = true;
|
| Create(parent_hwnd, NULL, NULL, WS_POPUP, ex_style);
|
| MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE);
|
| ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA);
|
|
|