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

Unified Diff: ui/base/cocoa/base_view.h

Issue 941543002: Mac: Speculative fix for tracking area crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bgv
Patch Set: Use event tap Created 5 years, 10 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
Index: ui/base/cocoa/base_view.h
diff --git a/ui/base/cocoa/base_view.h b/ui/base/cocoa/base_view.h
index 642ada2011d0812a58ed8c8ace2895b803b850cf..26e2fd63201f22f35c558a19ea3e6f7118f40663 100644
--- a/ui/base/cocoa/base_view.h
+++ b/ui/base/cocoa/base_view.h
@@ -28,8 +28,15 @@ UI_BASE_EXPORT
ui::ScopedCrTrackingArea trackingArea_;
BOOL dragging_;
base::scoped_nsobject<NSEvent> pendingExitEvent_;
+ id eventTap_;
}
+// NSTrackingInVisibleRect doesn't work correctly with Lion's window resizing,
+// http://crbug.com/176725 / http://openradar.appspot.com/radar?id=2773401 .
+// Setting |useEventTap| to YES will avoid using the tracking area for mouse
+// moved handling, and will instead tap it from the application's event stream.
+- (instancetype)initWithFrame:(NSRect)frame useEventTap:(BOOL)useEventTap;
Nico 2015/02/26 22:16:07 Should this be named by intent rather by workaroun
Andre 2015/02/26 22:29:58 Mouse moved events are enabled either way, using a
Nico 2015/02/26 23:43:24 needReliableMouseMoveEvents? :-)
Andre 2015/02/27 00:05:49 Sounds good, went with wantsReliableMouseEvents. P
+
// Override these methods (mouseEvent, keyEvent) in a subclass.
- (void)mouseEvent:(NSEvent *)theEvent;

Powered by Google App Engine
This is Rietveld 408576698