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

Unified Diff: chrome/browser/ui/cocoa/base_bubble_controller.mm

Issue 49063012: [rAC, OSX] Use bubble windows for error messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 7 years, 1 month 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
Index: chrome/browser/ui/cocoa/base_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller.mm b/chrome/browser/ui/cocoa/base_bubble_controller.mm
index fad938f381753510dd6ebe7abd54b47d80ef7c56..f08179b252be6a90089e14cb7b474b9b067e1982 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -210,6 +210,11 @@
addLocalMonitorForEventsMatchingMask:NSLeftMouseDownMask
handler:^NSEvent* (NSEvent* event) {
if (event.window != window) {
+ // Ignore this event if the window isn't key - in that case, it
+ // can't resign key status in the first place.
+ if (![window isKeyWindow])
+ return event;
+
// Call via the runloop because this block is called in the
// middle of event dispatch.
[self performSelector:@selector(windowDidResignKey:)

Powered by Google App Engine
This is Rietveld 408576698