| 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 85dc33627b1d853aebe03296affa86e9b96f3618..4e76eff3a3049aabdc99902052cd1cad0343dd56 100644
|
| --- a/ui/views/controls/button/custom_button.cc
|
| +++ b/ui/views/controls/button/custom_button.cc
|
| @@ -184,6 +184,8 @@ bool CustomButton::OnMouseDragged(const ui::MouseEvent& event) {
|
| }
|
|
|
| void CustomButton::OnMouseReleased(const ui::MouseEvent& event) {
|
| + const bool was_pressed = state_ == STATE_PRESSED;
|
| +
|
| if (state_ != STATE_DISABLED) {
|
| if (!HitTestPoint(event.location())) {
|
| SetState(STATE_NORMAL);
|
| @@ -197,7 +199,7 @@ void CustomButton::OnMouseReleased(const ui::MouseEvent& event) {
|
| }
|
| }
|
| }
|
| - if (notify_action_ == NOTIFY_ON_RELEASE)
|
| + if (notify_action_ == NOTIFY_ON_RELEASE && was_pressed)
|
| OnClickCanceled(event);
|
| }
|
|
|
|
|