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

Unified Diff: ui/views/cocoa/bridged_native_widget.h

Issue 2448173002: Fix processing of mouse events on MacViews.
Patch Set: Fix review issues. 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 | « ui/views/cocoa/bridged_content_view.mm ('k') | ui/views/cocoa/bridged_native_widget.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_native_widget.h
diff --git a/ui/views/cocoa/bridged_native_widget.h b/ui/views/cocoa/bridged_native_widget.h
index 0bb5fd98c92dc991a4cd65c76565b575f67be260..f26109400542a3fcfe1f6aa0e4ac1e3a4c3bb416 100644
--- a/ui/views/cocoa/bridged_native_widget.h
+++ b/ui/views/cocoa/bridged_native_widget.h
@@ -101,6 +101,8 @@ class VIEWS_EXPORT BridgedNativeWidget
void ReleaseCapture();
bool HasCapture();
+ void OnMouseEvent(NSEvent* event);
+
// Start moving the window, pinned to the mouse cursor, and monitor events.
// Return MOVE_LOOP_SUCCESSFUL on mouse up or MOVE_LOOP_CANCELED on premature
// termination via EndMoveLoop() or when window is destroyed during the drag.
@@ -263,6 +265,8 @@ class VIEWS_EXPORT BridgedNativeWidget
base::TimeTicks* timebase, base::TimeDelta* interval) const override;
void AcceleratedWidgetSwapCompleted() override;
+ void SendStoredMouseExitedEventToWidget();
+
// Overridden from BridgedNativeWidgetOwner:
NSWindow* GetNSWindow() override;
gfx::Vector2d GetChildWindowOffset() const override;
@@ -320,6 +324,11 @@ class VIEWS_EXPORT BridgedNativeWidget
AssociatedViews associated_views_;
+ // We don't immediately send MouseExited notifications when we're inside of a
+ // drag operation.
+ std::unique_ptr<ui::MouseEvent> pendingExitEvent_;
+ bool mouse_inside_ = false;
+
DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget);
};
« no previous file with comments | « ui/views/cocoa/bridged_content_view.mm ('k') | ui/views/cocoa/bridged_native_widget.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698