Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: views/widget/native_widget_win.cc

Issue 8052019: Create constrained windows in a hidden state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« chrome/browser/ui/views/constrained_window_views.cc ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698