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

Unified Diff: views/widget/widget_win.cc

Issue 6331006: Make the code for unmaximizing the window during SetBounds much simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | views/widget/widget_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget_win.cc
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 8bc3c2c41bf6f8a44e5d70890d9a7b4d92b1a224..08dbe9206368785ab1c09fad73d99f20da8576ff 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -239,8 +239,9 @@ void WidgetWin::GetBounds(gfx::Rect* out, bool including_frame) const {
}
void WidgetWin::SetBounds(const gfx::Rect& bounds) {
- if (IsZoomed())
- ShowWindow(SW_SHOWNOACTIVATE);
+ LONG style = GetWindowLong(GWL_STYLE);
+ if (style & WS_MAXIMIZE)
+ SetWindowLong(GWL_STYLE, style & ~WS_MAXIMIZE);
SetWindowPos(NULL, bounds.x(), bounds.y(), bounds.width(), bounds.height(),
SWP_NOACTIVATE | SWP_NOZORDER);
}
« no previous file with comments | « no previous file | views/widget/widget_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698