Index: ui/views/controls/button/custom_button.cc |
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc |
index 62b96997799c96688f0ddc5e7f7d85c90370e16c..85dc33627b1d853aebe03296affa86e9b96f3618 100644 |
--- a/ui/views/controls/button/custom_button.cc |
+++ b/ui/views/controls/button/custom_button.cc |
@@ -163,15 +163,17 @@ bool CustomButton::OnMousePressed(const ui::MouseEvent& event) { |
bool CustomButton::OnMouseDragged(const ui::MouseEvent& event) { |
if (state_ != STATE_DISABLED) { |
const bool should_enter_pushed = ShouldEnterPushedState(event); |
+ const bool should_show_pending = |
+ should_enter_pushed && notify_action_ == NOTIFY_ON_RELEASE && !InDrag(); |
if (HitTestPoint(event.location())) { |
SetState(should_enter_pushed ? STATE_PRESSED : STATE_HOVERED); |
- if (!InDrag() && should_enter_pushed && |
+ if (should_show_pending && |
ink_drop()->GetTargetInkDropState() == views::InkDropState::HIDDEN) { |
AnimateInkDrop(views::InkDropState::ACTION_PENDING, &event); |
} |
} else { |
SetState(STATE_NORMAL); |
- if (!InDrag() && should_enter_pushed && |
+ if (should_show_pending && |
ink_drop()->GetTargetInkDropState() == |
views::InkDropState::ACTION_PENDING) { |
AnimateInkDrop(views::InkDropState::HIDDEN, &event); |