summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_button.h
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 15:41:05 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 15:41:05 +0000
commita2d806f5df8b4189ef76014c69e277bed9f849b3 (patch)
tree156d30592b3e2dffe2226dcd4e9be0204687e738 /chrome/browser/cocoa/bookmark_button.h
parent2b07b84191a266cb8c9dd86b6957df4947b136e0 (diff)
downloadchromium_src-a2d806f5df8b4189ef76014c69e277bed9f849b3.zip
chromium_src-a2d806f5df8b4189ef76014c69e277bed9f849b3.tar.gz
chromium_src-a2d806f5df8b4189ef76014c69e277bed9f849b3.tar.bz2
Mac: fix Esc-key cancellation of bookmark bar button drags.
The drag would be cancelled after pressing Esc, but moving the mouse again would cause the bookmark bar button to see a drag again and start a new drag. This patch makes the button wait for the next mouse down. BUG=28502 TEST=Drag bookmark bar button and keep mouse button; press Esc (and see cancellation animation); move mouse again and make sure a new drag doesn't start. Review URL: http://codereview.chromium.org/437055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_button.h')
-rw-r--r--chrome/browser/cocoa/bookmark_button.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/bookmark_button.h b/chrome/browser/cocoa/bookmark_button.h
index 79c878a..ea3decc 100644
--- a/chrome/browser/cocoa/bookmark_button.h
+++ b/chrome/browser/cocoa/bookmark_button.h
@@ -7,8 +7,9 @@
// Class for bookmark bar buttons that can be drag sources.
@interface BookmarkButton : NSButton {
@private
- BOOL draggable_;
- BOOL beingDragged_; // are we being dragged?
+ BOOL draggable_; // Is this a draggable type of button?
+ BOOL mayDragStart_; // Set to YES on mouse down, NO on up or drag.
+ BOOL beingDragged_;
// Initial mouse-down to prevent a hair-trigger drag.
NSPoint initialMouseDownLocation_;