Index: chrome/browser/renderer_host/render_widget_host_view_mac.mm |
=================================================================== |
--- chrome/browser/renderer_host/render_widget_host_view_mac.mm (revision 79160) |
+++ chrome/browser/renderer_host/render_widget_host_view_mac.mm (working copy) |
@@ -1437,6 +1437,14 @@ |
} |
- (void)mouseEvent:(NSEvent*)theEvent { |
+ |
Mark Mentovai
2011/03/23 20:01:25
Don’t start a function with a blank line.
|
+ // Use hitTest to check whether we're the frontmost view for this mouse |
+ // location. If this is not the frontmost view, don't handle the event |
+ // here - let the frontmost view handle it. |
+ NSView *contentView = [[self window] contentView]; |
+ if ([contentView hitTest:[theEvent locationInWindow]] != self) |
+ return; |
+ |
// TODO(rohitrao): Probably need to handle other mouse down events here. |
if ([theEvent type] == NSLeftMouseDown && takesFocusOnlyOnMouseDown_) { |
if (renderWidgetHostView_->render_widget_host_) |