Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Unified Diff: views/controls/button/custom_button.cc

Issue 159838: Right clicking the back and forward buttons is buggy. A single right click op... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/button/custom_button.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/custom_button.cc
===================================================================
--- views/controls/button/custom_button.cc (revision 22914)
+++ views/controls/button/custom_button.cc (working copy)
@@ -97,7 +97,7 @@
bool CustomButton::OnMousePressed(const MouseEvent& e) {
if (state_ != BS_DISABLED) {
- if (IsTriggerableEvent(e) && HitTest(e.location()))
+ if (ShouldEnterPushedState(e) && HitTest(e.location()))
SetState(BS_PUSHED);
RequestFocus();
}
@@ -108,7 +108,7 @@
if (state_ != BS_DISABLED) {
if (!HitTest(e.location()))
SetState(BS_NORMAL);
- else if (IsTriggerableEvent(e))
+ else if (ShouldEnterPushedState(e))
SetState(BS_PUSHED);
else
SetState(BS_HOT);
@@ -214,6 +214,10 @@
SchedulePaint();
}
+bool CustomButton::ShouldEnterPushedState(const MouseEvent& e) {
+ return IsTriggerableEvent(e);
+}
+
////////////////////////////////////////////////////////////////////////////////
// CustomButton, private:
« no previous file with comments | « views/controls/button/custom_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698