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

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: add TODO comment for beng. Created 8 years, 4 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 c6d735fa28619d281ffceaefe5a108b95baa5270..250ffda05a7049501136904e4ebbf9929a0f192e 100644
--- a/ui/views/widget/native_widget_win.cc
+++ b/ui/views/widget/native_widget_win.cc
@@ -2500,10 +2500,13 @@ bool NativeWidgetWin::WidgetSizeIsClientSize() const {
}
void NativeWidgetWin::ClientAreaSizeChanged() {
- RECT r;
- if (WidgetSizeIsClientSize())
- GetClientRect(&r);
- else
+ RECT r = {0, 0, 0, 0};
+ if (WidgetSizeIsClientSize()) {
+ // TODO(beng): investigate whether this could be done
+ // from other branch of if-else.
+ if (!IsMinimized())
+ GetClientRect(&r);
+ } else
GetWindowRect(&r);
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