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

Unified Diff: ui/views/cocoa/bridged_content_view.mm

Issue 1815563002: MacViews: Enable acceptsFirstMouse for BridgedContentView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 9 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/views/cocoa/bridged_content_view.mm
diff --git a/ui/views/cocoa/bridged_content_view.mm b/ui/views/cocoa/bridged_content_view.mm
index 88a5b84de02afe7f709d6c19cc343db02f248143..6d72fef5cf7ece1d35262f4b7b1a572622710f05 100644
--- a/ui/views/cocoa/bridged_content_view.mm
+++ b/ui/views/cocoa/bridged_content_view.mm
@@ -510,6 +510,13 @@ gfx::Rect GetFirstRectForRangeHelper(const ui::TextInputClient* client,
ui::CanvasPainter(&canvas, 1.f).context());
}
+// To maximize consistency with the Cocoa browser (mac_views_browser=0), accept
+// mouse clicks immediately so that clicking on Chrome from an inactive window
+// will allow the event to be processed, rather than merely activate the window.
+- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
+ return YES;
+}
+
- (NSTextInputContext*)inputContext {
// If the textInputClient_ does not exist, return nil since this view does not
// conform to NSTextInputClient protocol.
« 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