Chromium Code Reviews| Index: ash/system/tray/system_tray.cc |
| diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc |
| index ed64a7e2e9dc44f78a42a7656ffb13e71a722a74..ad155934403a75f4d4f25f2d01365ddae665cb40 100644 |
| --- a/ash/system/tray/system_tray.cc |
| +++ b/ash/system/tray/system_tray.cc |
| @@ -221,7 +221,9 @@ class SystemTrayBubbleBorder : public views::Border { |
| owner_->width() - kShadowOffset, kShadowHeight), |
| kShadowColor); |
| - if (Shell::GetInstance()->shelf()->IsVisible()) { |
| + Shell* shell = Shell::GetInstance(); |
| + if (shell->shelf()->IsVisible() && |
| + !shell->tray()->GetWidget()->GetWindowScreenBounds().IsEmpty()) { |
|
sadrul
2012/04/09 00:08:37
Should 'IsVisible' check whether it has non-empty
sky
2012/04/09 15:11:21
Yes, I think that's a good idea.
sadrul
2012/04/09 20:56:28
Done.
|
| // Draw the arrow. |
| int left_base_x = owner_->width() - kArrowPaddingFromRight - kArrowWidth; |
| int left_base_y = y; |
| @@ -351,6 +353,12 @@ class SystemTrayBubble : public views::BubbleDelegateView { |
| } |
| } |
| + virtual gfx::Rect GetAnchorRect() OVERRIDE { |
| + gfx::Rect rect = tray_->GetWidget()->GetWindowScreenBounds(); |
| + rect.Inset(0, 0, kPaddingFromRightEdgeOfScreen, 0); |
| + return rect; |
| + } |
| + |
| // Overridden from views::View. |
| virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE { |
| state->role = ui::AccessibilityTypes::ROLE_WINDOW; |