Index: views/widget/native_widget_win.cc |
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc |
index 92b83eaa3b4870599180cfeba7ce90e3af5d7fa9..9d813b9dab8e67d399da4214a286304752e836e8 100644 |
--- a/views/widget/native_widget_win.cc |
+++ b/views/widget/native_widget_win.cc |
@@ -934,6 +934,8 @@ bool NativeWidgetWin::IsVisible() const { |
void NativeWidgetWin::Activate() { |
if (IsMinimized()) |
::ShowWindow(GetNativeView(), SW_RESTORE); |
+ else if (!IsVisible()) |
+ Show(); |
::SetWindowPos(GetNativeView(), HWND_TOP, 0, 0, 0, 0, |
SWP_NOSIZE | SWP_NOMOVE); |
SetForegroundWindow(GetNativeView()); |
@@ -2237,7 +2239,7 @@ void NativeWidgetWin::SetInitParams(const Widget::InitParams& params) { |
// Set type-independent style attributes. |
if (params.child) |
- style |= WS_CHILD | WS_VISIBLE; |
+ style |= WS_CHILD; |
if (params.show_state == ui::SHOW_STATE_MAXIMIZED) |
style |= WS_MAXIMIZE; |
if (params.show_state == ui::SHOW_STATE_MINIMIZED) |
@@ -2280,6 +2282,7 @@ void NativeWidgetWin::SetInitParams(const Widget::InitParams& params) { |
break; |
} |
case Widget::InitParams::TYPE_CONTROL: |
+ style |= WS_VISIBLE; |
break; |
case Widget::InitParams::TYPE_WINDOW_FRAMELESS: |
style |= WS_POPUP; |