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

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

Issue 2393323005: [Mac] Use a nonactivating panel for notifications so that mouse down doesn't activate Chrome. (Closed)
Patch Set: Make dependent on bugfix CL 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/popup_controller.mm
diff --git a/ui/message_center/cocoa/popup_controller.mm b/ui/message_center/cocoa/popup_controller.mm
index 7e8407d11def8ecb9bf6bb98fc25aabca7970cde..e8e77281495856a42ec053b0373fa7fec2cd64ac 100644
--- a/ui/message_center/cocoa/popup_controller.mm
+++ b/ui/message_center/cocoa/popup_controller.mm
@@ -31,7 +31,7 @@
// Window Subclass /////////////////////////////////////////////////////////////
-@interface MCPopupWindow : NSWindow {
+@interface MCPopupWindow : NSPanel {
// The cumulative X and Y scrollingDeltas since the -scrollWheel: event began.
NSPoint totalScrollDelta_;
}
@@ -98,27 +98,23 @@
- (id)initWithNotification:(const message_center::Notification*)notification
messageCenter:(message_center::MessageCenter*)messageCenter
popupCollection:(MCPopupCollection*)popupCollection {
- base::scoped_nsobject<MCPopupWindow> window(
- [[MCPopupWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
- styleMask:NSBorderlessWindowMask
- backing:NSBackingStoreBuffered
- defer:NO]);
+ base::scoped_nsobject<MCPopupWindow> window([[MCPopupWindow alloc]
+ initWithContentRect:ui::kWindowSizeDeterminedLater
+ styleMask:NSNonactivatingPanelMask
+ backing:NSBackingStoreBuffered
+ defer:NO]);
if ((self = [super initWithWindow:window])) {
messageCenter_ = messageCenter;
popupCollection_ = popupCollection;
notificationController_.reset(
[[MCNotificationController alloc] initWithNotification:notification
messageCenter:messageCenter_]);
- isClosing_ = NO;
bounds_ = [[notificationController_ view] frame];
- [window setReleasedWhenClosed:NO];
-
- [window setLevel:NSFloatingWindowLevel];
- [window setExcludedFromWindowsMenu:YES];
+ [window setFloatingPanel:YES];
+ [window setBecomesKeyOnlyIfNeeded:YES];
tapted 2016/10/11 03:55:44 ah-ha! So If I comment out this line, then crbug.c
[window
setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces |
- NSWindowCollectionBehaviorIgnoresCycle |
NSWindowCollectionBehaviorFullScreenAuxiliary];
[window setHasShadow:YES];
« 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