diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 21:04:33 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 21:04:33 +0000 |
commit | f8d19e8bfe27bfd47a0d22878d6ab98b08f6275f (patch) | |
tree | 74b6fe840d81fef1435696f2450b9aa5bc9478ab /views/window | |
parent | 91b2805a31195aedebb910fa12f886a45fd55bcb (diff) | |
download | chromium_src-f8d19e8bfe27bfd47a0d22878d6ab98b08f6275f.zip chromium_src-f8d19e8bfe27bfd47a0d22878d6ab98b08f6275f.tar.gz chromium_src-f8d19e8bfe27bfd47a0d22878d6ab98b08f6275f.tar.bz2 |
Fix bubbles deactivating the opaque frame.
The theme work caused a check that had been included to see if the frame view should be painted as active even if it was inactive. This reintroduces that check.
http://crbug.com/20966
TEST=see bug
Review URL: http://codereview.chromium.org/303012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r-- | views/window/non_client_view.cc | 4 | ||||
-rw-r--r-- | views/window/non_client_view.h | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/views/window/non_client_view.cc b/views/window/non_client_view.cc index 29c48cc..d6d7b93 100644 --- a/views/window/non_client_view.cc +++ b/views/window/non_client_view.cc @@ -276,4 +276,8 @@ int NonClientFrameView::GetHTComponentForFrame(const gfx::Point& point, return can_resize ? component : HTBORDER; } +bool NonClientFrameView::ShouldPaintAsActive() const { + return GetWindow()->IsActive() || paint_as_active_; +} + } // namespace views diff --git a/views/window/non_client_view.h b/views/window/non_client_view.h index 34992ec..902967d 100644 --- a/views/window/non_client_view.h +++ b/views/window/non_client_view.h @@ -31,6 +31,9 @@ class NonClientFrameView : public View { // frame border. static const int kClientEdgeThickness; + // Prevent the frame view from painting its inactive state. Prevents a related + // window from causing its owner to appear deactivated. Used for windows like + // bubbles. void DisableInactiveRendering(bool disable) { paint_as_active_ = disable; if (!paint_as_active_) @@ -81,8 +84,10 @@ class NonClientFrameView : public View { int resize_corner_width, bool can_resize); - // Accessor for paint_as_active_. - bool paint_as_active() const { return paint_as_active_; } + // Used to determine if the frame should be painted as active. Keyed off the + // window's actual active state and the override, see + // DisableInactiveRendering() above. + bool ShouldPaintAsActive() const; private: // True when the non-client view should always be rendered as if the window |