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

Unified Diff: ui/base/cocoa/tool_tip_base_view.mm

Issue 2686723003: Use correct timestamp for generated mouse events on Mac. (Closed)
Patch Set: fix Created 3 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/tool_tip_base_view.mm
diff --git a/ui/base/cocoa/tool_tip_base_view.mm b/ui/base/cocoa/tool_tip_base_view.mm
index 790919217eafd719ef47f5ccb973221713998287..059889a7b9a824945764a2acc389952ab5ee7004 100644
--- a/ui/base/cocoa/tool_tip_base_view.mm
+++ b/ui/base/cocoa/tool_tip_base_view.mm
@@ -131,10 +131,11 @@ const NSTrackingRectTag kTrackingRectTag = 0xBADFACE;
- (void)_sendToolTipMouseExited {
// Nothing matters except window, trackingNumber, and userData.
int windowNumber = [[self window] windowNumber];
+ NSTimeInterval eventTime = [[NSApp currentEvent] timestamp];
NSEvent* fakeEvent = [NSEvent enterExitEventWithType:NSMouseExited
location:NSZeroPoint
modifierFlags:0
- timestamp:0
+ timestamp:eventTime
windowNumber:windowNumber
context:NULL
eventNumber:0
@@ -147,10 +148,11 @@ const NSTrackingRectTag kTrackingRectTag = 0xBADFACE;
- (void)_sendToolTipMouseEntered {
// Nothing matters except window, trackingNumber, and userData.
int windowNumber = [[self window] windowNumber];
+ NSTimeInterval eventTime = [[NSApp currentEvent] timestamp];
NSEvent* fakeEvent = [NSEvent enterExitEventWithType:NSMouseEntered
location:NSZeroPoint
modifierFlags:0
- timestamp:0
+ timestamp:eventTime
windowNumber:windowNumber
context:NULL
eventNumber:0
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698