Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: ui/message_center/cocoa/notification_controller.mm

Issue 2400033003: [Mac] Activate notifications on mouse *up*. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/cocoa/notification_controller.mm
diff --git a/ui/message_center/cocoa/notification_controller.mm b/ui/message_center/cocoa/notification_controller.mm
index 7893e96d69cf911474ec1b07b4c8bc4357e8f14b..b14c26c2e88cedfec14638f37893352c7c60c5f8 100644
--- a/ui/message_center/cocoa/notification_controller.mm
+++ b/ui/message_center/cocoa/notification_controller.mm
@@ -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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698