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

Unified Diff: ui/views/widget/native_widget_win.cc

Issue 10815006: Layout in the ShellWindow becomes chaos (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: update patch to not cut relayout code patch cruelly. Created 8 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_win.cc
diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc
index 6c65886a37bae6d3869250366ccc58c9088ea296..1b7311b455fa8edcf343dc35fa2aba26b10b839e 100644
--- a/ui/views/widget/native_widget_win.cc
+++ b/ui/views/widget/native_widget_win.cc
@@ -2495,10 +2495,11 @@ bool NativeWidgetWin::WidgetSizeIsClientSize() const {
}
void NativeWidgetWin::ClientAreaSizeChanged() {
- RECT r;
- if (WidgetSizeIsClientSize())
- GetClientRect(&r);
- else
+ RECT r = {0, 0, 0, 0};
+ if (WidgetSizeIsClientSize()) {
+ if (!IsMinimized())
+ GetClientRect(&r);
+ } else
GetWindowRect(&r);
Ben Goodger (Google) 2012/08/06 19:32:35 braces around else too.
gfx::Size s(std::max(0, static_cast<int>(r.right - r.left)),
std::max(0, static_cast<int>(r.bottom - r.top)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698