Commit e006b133 authored by sdy's avatar sdy Committed by Commit bot

[Mac] Activate notifications on mouse *up*.

Buttons respond on mouse up. This is nice because it gives the user a
chance to change their mind by moving the mouse away from the button
before releasing.

This makes notifications behave the same way.

BUG=653862

Review-Url: https://codereview.chromium.org/2400033003
Cr-Commit-Position: refs/heads/master@{#423877}
parent 443bd15a
......@@ -184,12 +184,15 @@
return self;
}
- (void)mouseDown:(NSEvent*)event {
if ([event type] != NSLeftMouseDown) {
[super mouseDown:event];
- (void)mouseUp:(NSEvent*)event {
if (event.type != NSLeftMouseUp) {
[super mouseUp:event];
return;
}
[controller_ notificationClicked];
if (NSPointInRect([self convertPoint:event.locationInWindow fromView:nil],
self.bounds)) {
[controller_ notificationClicked];
}
}
- (NSView*)hitTest:(NSPoint)point {
......
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