summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorjunmin.zhu@intel.com <junmin.zhu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-07 03:55:51 +0000
committerjunmin.zhu@intel.com <junmin.zhu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-07 03:55:51 +0000
commitc3ef1482737815afba39dd89750f9a629df6335e (patch)
treed3f74aac9ed7e3eedf93bcdad91f779a27b5e9f6 /ui
parent9940474ed6f8673c925495b206075e686187a392 (diff)
downloadchromium_src-c3ef1482737815afba39dd89750f9a629df6335e.zip
chromium_src-c3ef1482737815afba39dd89750f9a629df6335e.tar.gz
chromium_src-c3ef1482737815afba39dd89750f9a629df6335e.tar.bz2
Layout in the ShellWindow becomes chaos
after the window restored from minimize operation. BUG=138074 TEST=manually Review URL: https://chromiumcodereview.appspot.com/10815006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150256 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/views/widget/native_widget_win.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc
index c6d735f..250ffda 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)));