diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 23:46:45 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 23:46:45 +0000 |
commit | 875ee2360d93c2fd1d41b283723be63e67f78fc6 (patch) | |
tree | 322abbf0851761866cbbb279cd72665ef6ed23cd | |
parent | 4a53f13475572588fcbfe4fc75309ec4573271eb (diff) | |
download | chromium_src-875ee2360d93c2fd1d41b283723be63e67f78fc6.zip chromium_src-875ee2360d93c2fd1d41b283723be63e67f78fc6.tar.gz chromium_src-875ee2360d93c2fd1d41b283723be63e67f78fc6.tar.bz2 |
Hide the exit bubble when the main window is inactivated, and don't re-show until it's reactivated.
BUG=8945
Review URL: http://codereview.chromium.org/93048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14270 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/fullscreen_exit_bubble.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/views/fullscreen_exit_bubble.cc b/chrome/browser/views/fullscreen_exit_bubble.cc index 4146bbb..39ac7490 100644 --- a/chrome/browser/views/fullscreen_exit_bubble.cc +++ b/chrome/browser/views/fullscreen_exit_bubble.cc @@ -203,6 +203,7 @@ void FullscreenExitBubble::CheckMousePosition() { // | | Slide-out region // : : // + // * If app is not active, we hide the popup. // * If the mouse is offscreen or in the slide-out region, we hide the popup. // * If the mouse goes idle, we hide the popup. // * If the mouse is in the slide-in-region and not idle, we show the popup. @@ -228,7 +229,8 @@ void FullscreenExitBubble::CheckMousePosition() { } last_mouse_pos_ = transformed_pos; - if (!root_view_->HitTest(transformed_pos) || + if ((GetActiveWindow() != root_view_->GetWidget()->GetNativeView()) || + !root_view_->HitTest(transformed_pos) || (cursor_pos.y >= GetPopupRect(true).bottom()) || !idle_timeout_.IsRunning()) { // The cursor is offscreen, in the slide-out region, or idle. @@ -243,7 +245,10 @@ void FullscreenExitBubble::CheckMousePosition() { } void FullscreenExitBubble::Hide() { - if (!initial_delay_.IsRunning()) { + // Allow the bubble to hide if the window is deactivated or our initial delay + // finishes. + if ((GetActiveWindow() != root_view_->GetWidget()->GetNativeView()) || + !initial_delay_.IsRunning()) { size_animation_->SetSlideDuration(kSlideOutDurationMs); size_animation_->Hide(); } |