From c3ef1482737815afba39dd89750f9a629df6335e Mon Sep 17 00:00:00 2001 From: "junmin.zhu@intel.com" Date: Tue, 7 Aug 2012 03:55:51 +0000 Subject: 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 --- ui/views/widget/native_widget_win.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ui') 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(r.right - r.left)), std::max(0, static_cast(r.bottom - r.top))); -- cgit v1.1