summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 17:34:16 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 17:34:16 +0000
commitb6296fd565932f1362d32d6d5955e772d39c066f (patch)
tree24af03a5d52f317875b86da0f13bf2e25b7110a9
parente2bdba765ef03280231c5df670f42d73a69263af (diff)
downloadchromium_src-b6296fd565932f1362d32d6d5955e772d39c066f.zip
chromium_src-b6296fd565932f1362d32d6d5955e772d39c066f.tar.gz
chromium_src-b6296fd565932f1362d32d6d5955e772d39c066f.tar.bz2
Fix an issue with HWNDView visibility where invisible (i.e. SetVisible(false)) views would have ShowWindow() called on them, which was bogus.
Review URL: http://codereview.chromium.org/21333 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9760 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/views/hwnd_view.cc6
-rw-r--r--chrome/views/view.cc2
2 files changed, 3 insertions, 5 deletions
diff --git a/chrome/views/hwnd_view.cc b/chrome/views/hwnd_view.cc
index 8ecc9c0..55786b6 100644
--- a/chrome/views/hwnd_view.cc
+++ b/chrome/views/hwnd_view.cc
@@ -139,11 +139,7 @@ void HWNDView::DidChangeBounds(const gfx::Rect& previous,
}
void HWNDView::VisibilityChanged(View* starting_from, bool is_visible) {
- //UpdateHWNDBounds();
- if (IsVisibleInRootView())
- ::ShowWindow(hwnd_, SW_SHOW);
- else
- ::ShowWindow(hwnd_, SW_HIDE);
+ UpdateHWNDBounds();
}
gfx::Size HWNDView::GetPreferredSize() {
diff --git a/chrome/views/view.cc b/chrome/views/view.cc
index e65a0c9..3a06c3b 100644
--- a/chrome/views/view.cc
+++ b/chrome/views/view.cc
@@ -1480,6 +1480,8 @@ std::string View::GetClassName() const {
}
gfx::Rect View::GetVisibleBounds() {
+ if (!IsVisibleInRootView())
+ return gfx::Rect();
gfx::Rect vis_bounds(0, 0, width(), height());
gfx::Rect ancestor_bounds;
View* view = this;