summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 22:11:55 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 22:11:55 +0000
commit9bf414752683e232429b8d18022bfc43c80cc279 (patch)
tree50a8adb0fdba0ee2745e9361ca3a65c52233aee4 /chrome
parentff9efc6f99824e68a67cd694d4623f058d07cb51 (diff)
downloadchromium_src-9bf414752683e232429b8d18022bfc43c80cc279.zip
chromium_src-9bf414752683e232429b8d18022bfc43c80cc279.tar.gz
chromium_src-9bf414752683e232429b8d18022bfc43c80cc279.tar.bz2
Mac fullscreen: prevent mouse clicks on overlay from passing through to content.
Also make it so that double-clicks on overlay should (theoretically) minimize. BUG=36108 TEST=Enter fullscreen mode. With content having links or similar (e.g., NTP bookmark bar), click at various locations on the (slide-down) overlay bar. Clicks should not pass through. Mouse cursor should not reflect web content underneath. Review URL: http://codereview.chromium.org/646004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/cocoa/floating_bar_backing_view.mm18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/floating_bar_backing_view.mm b/chrome/browser/cocoa/floating_bar_backing_view.mm
index 1c9757f..6289099 100644
--- a/chrome/browser/cocoa/floating_bar_backing_view.mm
+++ b/chrome/browser/cocoa/floating_bar_backing_view.mm
@@ -69,4 +69,22 @@
}
}
+// Eat all mouse events (and do *not* pass them on to the next responder!).
+- (void)mouseDown:(NSEvent*)event {}
+- (void)rightMouseDown:(NSEvent*)event {}
+- (void)otherMouseDown:(NSEvent*)event {}
+- (void)rightMouseUp:(NSEvent*)event {}
+- (void)otherMouseUp:(NSEvent*)event {}
+- (void)mouseMoved:(NSEvent*)event {}
+- (void)mouseDragged:(NSEvent*)event {}
+- (void)rightMouseDragged:(NSEvent*)event {}
+- (void)otherMouseDragged:(NSEvent*)event {}
+
+// Eat this too, except that ...
+- (void)mouseUp:(NSEvent*)event {
+ // a double-click in the blank area should minimize.
+ if ([event clickCount] == 2)
+ [[self window] performMiniaturize:self];
+}
+
@end // @implementation FloatingBarBackingView