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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2933353003: Mark the ET_MOUSE_MOVED created from a pointer grab as synthesized. (Closed)
Patch Set: Investigate use-after-free. Created 3 years, 6 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/aura/window_event_dispatcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 1414ba2b760f7f74b9b46760140480fd749f78c3..c2e1a19e0aaebdb9ccab2e03e8891bdb8573bded 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -1918,6 +1918,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
// NativeViewGLSurfaceGLX adds a child to |xwindow_|.
if (xev->xcrossing.detail != NotifyInferior) {
ui::MouseEvent mouse_event(xev);
+ // EnterNotify creates ET_MOUSE_MOVED. Mark as synthesized as this is
+ // not a real mouse move event.
+ if (xev->type == EnterNotify)
+ mouse_event.set_flags(mouse_event.flags() | ui::EF_IS_SYNTHESIZED);
sadrul 2017/06/16 16:03:36 Looks like we are always doing this [1, 2]. Can we
Kevin McNee 2017/06/29 22:41:42 Done.
DispatchMouseEvent(&mouse_event);
}
break;
« no previous file with comments | « ui/aura/window_event_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698