| Index: chrome/browser/cocoa/tab_strip_view.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/tab_strip_view.mm (revision 16871)
|
| +++ chrome/browser/cocoa/tab_strip_view.mm (working copy)
|
| @@ -23,4 +23,24 @@
|
| NSRectFillUsingOperation(borderRect, NSCompositeSourceOver);
|
| }
|
|
|
| +// Allows this view to take clicks in background windows. Since it overlaps
|
| +// the title bar and window buttons, it needs to do this otherwise things like
|
| +// the close button doesn't work when the window is in the background.
|
| +- (BOOL)acceptsFirstMouse:(NSEvent*)event {
|
| + return YES;
|
| +}
|
| +
|
| +// Called to determine where in our view hierarchy the click should go. We
|
| +// want clicks to go to our children (tabs, new tab button, etc), but no click
|
| +// should ever go to this view. In fact, returning this view breaks things
|
| +// such as the window buttons and double-clicking the title bar since the
|
| +// window manager believes there is a view that wants the mouse event. If the
|
| +// superclass impl says the click should go here, just cheat and return nil.
|
| +- (NSView*)hitTest:(NSPoint)point {
|
| + NSView* hit = [super hitTest:point];
|
| + if ([hit isEqual:self])
|
| + hit = nil;
|
| + return hit;
|
| +}
|
| +
|
| @end
|
|
|