| Index: ash/common/system/chromeos/palette/palette_tray.cc
|
| diff --git a/ash/common/system/chromeos/palette/palette_tray.cc b/ash/common/system/chromeos/palette/palette_tray.cc
|
| index d205b4b04d4f3e9ebcc5b51c010092a52725f658..634c5cf476018cdf74a1f2de8bb11376955e5ba5 100644
|
| --- a/ash/common/system/chromeos/palette/palette_tray.cc
|
| +++ b/ash/common/system/chromeos/palette/palette_tray.cc
|
| @@ -167,10 +167,13 @@ bool PaletteTray::PerformAction(const ui::Event& event) {
|
| return true;
|
| }
|
|
|
| - return OpenBubble();
|
| + return ShowPalette();
|
| }
|
|
|
| -bool PaletteTray::OpenBubble() {
|
| +bool PaletteTray::ShowPalette() {
|
| + if (bubble_)
|
| + return false;
|
| +
|
| views::TrayBubbleView::InitParams init_params(
|
| views::TrayBubbleView::ANCHOR_TYPE_TRAY, GetAnchorAlignment(),
|
| kPaletteWidth, kPaletteWidth);
|
| @@ -196,7 +199,6 @@ bool PaletteTray::OpenBubble() {
|
| bubble_.reset(new ash::TrayBubbleWrapper(this, bubble_view));
|
|
|
| SetDrawBackgroundAsActive(true);
|
| -
|
| return true;
|
| }
|
|
|
| @@ -335,7 +337,7 @@ void PaletteTray::OnStylusStateChanged(ui::StylusState stylus_state) {
|
| return;
|
|
|
| if (stylus_state == ui::StylusState::REMOVED && !bubble_)
|
| - OpenBubble();
|
| + ShowPalette();
|
| else if (stylus_state == ui::StylusState::INSERTED && bubble_)
|
| bubble_.reset();
|
| }
|
|
|