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

Unified Diff: ui/aura/root_window_host_x11.cc

Issue 22264002: Mark mouse events created for Enter/Leave notify as synthesized as they're not real mouse events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | ui/views/corewm/compound_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_host_x11.cc
diff --git a/ui/aura/root_window_host_x11.cc b/ui/aura/root_window_host_x11.cc
index 0d00318f2a31b70b8fa0cb798da9ac72166c1680..ad1b957d7b5f4c70b832b60c3b3e15d3394f695b 100644
--- a/ui/aura/root_window_host_x11.cc
+++ b/ui/aura/root_window_host_x11.cc
@@ -458,7 +458,14 @@ bool RootWindowHostX11::Dispatch(const base::NativeEvent& event) {
return DispatchEventForRootWindow(event);
switch (xev->type) {
- case EnterNotify:
+ case EnterNotify: {
+ ui::MouseEvent mouse_event(xev);
+ // EnterNotify creates ET_MOUSE_MOVE. Mark as synthesized as this is not
+ // real mouse move event.
+ mouse_event.set_flags(mouse_event.flags() | ui::EF_IS_SYNTHESIZED);
+ TranslateAndDispatchMouseEvent(&mouse_event);
+ break;
+ }
case LeaveNotify: {
ui::MouseEvent mouse_event(xev);
TranslateAndDispatchMouseEvent(&mouse_event);
« no previous file with comments | « no previous file | ui/views/corewm/compound_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698