Commit a47974de authored by Sidney San Martín's avatar Sidney San Martín Committed by Commit Bot

Switch tabs on mouse down instead of mouse up.

This is consistent with other Mac apps and with Views, and makes the tab
strip feel more responsive.

Bug: 799230
Change-Id: I45a375f5892c10e5886e18f27ba049eb6215a17f
Reviewed-on: https://chromium-review.googlesource.com/895925Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Sidney San Martín <sdy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533373}
parent 04d1a33d
......@@ -63,6 +63,9 @@ static BOOL PointIsInsideView(NSPoint screenPoint, NSView* view) {
- (void)maybeStartDrag:(NSEvent*)theEvent forTab:(TabController*)tab {
[self resetDragControllers];
// Activate the tab.
[tab selectTab:self];
// Resolve overlay back to original window.
sourceWindow_ = [[tab view] window];
if ([sourceWindow_ isKindOfClass:[NSPanel class]]) {
......@@ -136,7 +139,6 @@ static BOOL PointIsInsideView(NSPoint screenPoint, NSView* view) {
} else if (type == NSLeftMouseDragged) {
[self continueDrag:theEvent];
} else if (type == NSLeftMouseUp) {
[tab selectTab:self];
[self endDrag:theEvent];
break;
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment